EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10277


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] RIOXX2 - attempt to dispose an undefined dom node


CAUTION: This e-mail originated outside the University of Southampton.
Hi,

I found a problem with our RIOXX2 plugin as I've been trying to make it functional again.

After a lot of investigation, I found that if a value is not set on some fields (presumably any, but I didn't try them all) I get an eprints system error of "attempt to dispose an undefined dom node" when trying to enter the rioxx stage of the workflow.

I searched the github repo and couldn't find an issue, but narrowed it down to:

sub_render_content in /opt/eprints3/lib/plugins/EPrints/Plugin/InputForm/Component/Field/RIOXX2.pm

I changed:

return $self->html_phrase( "content",
mapped_value => $field->render_value( $repo, undef, undef, undef, $self->{dataobj}, 1 ),

To:

my $mapped_value = $field->render_value( $repo, undef, undef, undef, $self->{dataobj}, 1 );
$mapped_value ||= $repo->xml->create_text_node("");

return $self->html_phrase( "content",
mapped_value => $mapped_value,

It now seems to work without an issue. Is anybody able to judge if this was the correct thing to do or if it is going to cause me nightmares further down the line? We are on EPrints 3.4.5. I only noticed rioxx playing up after upgrade, but I can't say it was working prior to the upgrade as it had fallen out of use.

Thanks,
James