Problem when exporting crossref xml

Hi,
When I try to export the crossref xml I get an http error 500.

It seems that the problem is:

ojs2 has produced an error Message: CAUGHT EXCEPTION: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, null given, called in C:\Users…\plugins\importexport\crossref\CrossRefExportDom.inc.php on line 209 and defined In file: C:\Users…\lib\pkp\classes\xml\XMLCustomWriter.inc.php At line: 71 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(4096, "Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, null given

PS: Previsously, it was working but we recently migrated OJS to another server and also added very few customization to the design.

Can anyone help?

What version of OJS are you running? I can’t find a recent version where CrossRefExportDom.inc.php’s line 209 is something other than a comment.

Hi,
It is version 2.4.1

There have been substantial changes to the CrossRef export in the last four years (as well as to the bulk of the software).

You should consider upgrading OJS. It looks like this bug has been resolved in previous releases.

I see. I am planing to upgrade, but right now I can’t, because there are many things for me to do. I have never upgraded OJS and I don’t know if it’s going to be difficult or how much time it will take.

Actually this problem logs:
PHP Fatal error: Call to a member function setParent() on a non-object in /var/www/html/ojs/lib/pkp/classes/xml/XMLCustomWriter.inc.php on line 74, referer: http://172.16.0.234:8080/index.php/.../manager/importexport/plugin/CrossRefExportPlugin/issues

(the first log happens when simulate the problem in my machine, not in the server)
Do you know if in any way my customizations in the lib/pkp templates would cause the export plugin to break? Is there any link between the two subjects? It was working before.
I ask this because searching the web I found the link https://github.com/barryvdh/laravel-dompdf/issues/149, where a similar problem happens, and in this case it was caused by css rules…

The prior message gives you a bit more information, I think:

CAUGHT EXCEPTION: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, null given, called in C:\Users...\plugins\importexport\crossref\CrossRefExportDom.inc.php on line 209 

This indicates that an undefined value exists for a supplemental file. In later versions, this assignment is wrapped in an if () {} block.

It might be as trivial as a change such as this, or it might be much deeper.