Error when exporting an article using the Native XML Plugin


When trying to export certain articles the page generates an error http 500.
Unfortunately I did not find an answer in the forum.
Below the apache error log.

[php7:notice] [pid 514] PHP Notice: Undefined offset: 0 in /lib/pkp/plugins/importexport/native/filter/ on line 79, referer: management/importexport/plugin/NativeImportExportPlugin

[php7:warn] [pid 514] PHP Warning: file_get_contents(/files/journals/20//articles/4105//4105-13-12023-1-0-20200810.docx): failed to open stream: Arquivo ou diret\xc3\xb3rio n\xc3\xa3o encontrado in /lib/pkp/plugins/importexport/native/filter/ on line 127, referer: https://management/importexport/plugin/NativeImportExportPlugin

[php7:notice] [pid 514] PHP Notice: Trying to get property ‘documentElement’ of non-object in /lib/pkp/plugins/importexport/native/filter/ on line 293, referer: https://management/importexport/plugin/NativeImportExportPlugin

[php7:error] [pid 514] PHP Fatal error: Uncaught Error: Call to a member function getAttribute() on null in /lib/pkp/plugins/importexport/native/filter/\nStack trace:\n#0 /lib/pkp/plugins/importexport/native/filter/ SubmissionNativeXmlFilter->addFiles(Object(DOMDocument), Object(DOMElement), Object(Article))\n#1 /plugins/importexport/native/filter/ SubmissionNativeXmlFilter->createSubmissionNode(Object(DOMDocument), Object(Article))\n#2 /lib/pkp/plugins/importexport/native/filter/ ArticleNativeXmlFilter->createSubmissionNode(Object(DOMDocument), Object(Article))\n#3 /lib/pkp/classes/filter/ SubmissionNativeXmlFilter->process(Array)\n#4 /plugins/importexport/native/ Filter->execute(Array, true)\n#5 in /lib/pkp/plugins/importexport/native/filter/ on line 293, referer: https://management/importexport/plugin/NativeImportExportPlugin

Thank you for now.

Hi @Tineu,

I think the issue is related to the missing file warning you received. It says that the file /files/journals/20/articles/4105/4105-13-12023-1-0-20200810.docx doesn’t exist or can’t be read. If that file really is missing, you can put a placeholder .pdf file in its place.

Alec Smecher
Public Knowledge Project Team

In fact, it didn’t exist at all.
What existed in the place was practically the same file with the slightly different name.
The file name did not contain “0” with only 2 dashes “-”.
I made a copy of the file and renamed it to the correct name.
The problem was corrected and thankfully it only occurred on 3 occasions.

I appreciate the attention.


1 Like