Error when exporting an article using the Native XML Plugin

OJS 3.1.2.4

Hello,
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/SubmissionFileNativeXmlFilter.inc.php 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/SubmissionFileNativeXmlFilter.inc.php 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/SubmissionNativeXmlFilter.inc.php 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/SubmissionNativeXmlFilter.inc.php:293\nStack trace:\n#0 /lib/pkp/plugins/importexport/native/filter/SubmissionNativeXmlFilter.inc.php(107): SubmissionNativeXmlFilter->addFiles(Object(DOMDocument), Object(DOMElement), Object(Article))\n#1 /plugins/importexport/native/filter/ArticleNativeXmlFilter.inc.php(61): SubmissionNativeXmlFilter->createSubmissionNode(Object(DOMDocument), Object(Article))\n#2 /lib/pkp/plugins/importexport/native/filter/SubmissionNativeXmlFilter.inc.php(65): ArticleNativeXmlFilter->createSubmissionNode(Object(DOMDocument), Object(Article))\n#3 /lib/pkp/classes/filter/Filter.inc.php(449): SubmissionNativeXmlFilter->process(Array)\n#4 /plugins/importexport/native/NativeImportExportPlugin.inc.php(232): Filter->execute(Array, true)\n#5 in /lib/pkp/plugins/importexport/native/filter/SubmissionNativeXmlFilter.inc.php on line 293, referer: https://management/importexport/plugin/NativeImportExportPlugin

Thank you for now.
Felipe.

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.

Regards,
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.
4105-13-12023-1–20200810.docx
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.

Felipe.

1 Like