Native XML Export errors after upgrade to OJS 3.5

Since updating my test OJS instance to 3.5.0.4, I can’t use the Native XML export feature. I should note that this is an upgraded installation, and all the submissions were made in OJS 2.4. First of all, I’m getting multiple warnings such as

The submission file 11694 was skipped because it is attached to a record that will not be imported, such as a review assignment or discussion.

The warning was also mentioned, but not fully explained, here Issues with Native Import/Export Plugin (OJS 3.4.0-9) in multi-tenant to single-tenant migration . Can anybody explain what this means? Does it just mean that some files, e.g., submission files or the files that were uploaded during some review rounds, will not be base64-encoded into the resulting XML, or there is more to it?

Second, what is worse, in addition to the warnings for the majority of publications I’m getting errors such as

Process failed to parse publications

or

Process failed to parse authors

with one the following details in the logs:

Got error 'PHP message: PHP Warning: Trying to access array offset on null in .../lib/pkp/plugins/importexport/native/filter/PKPPublicationNativeXmlFilter.php on line 250; PHP message: Exception: XML validation failed with:\nArray\n(\n [0] => LibXMLError Object\n (\n [level] => 2\n [code] => 1871\n [column] => 0\n [message] => Element '{http://pkp.sfu.ca}agency': This element is not expected. Expected is ( {http://pkp.sfu.ca}keyword...

Got error 'PHP message: Exception: XML validation failed with:\nArray\n(\n [0] => LibXMLError Object\n (\n [level] => 2\n [code] => 1871\n [column] => 0\n [message] => Element '{http://pkp.sfu.ca}agency': This element is not expected. Expected is ( {http://pkp.sfu.ca}keyword...

Got error 'PHP message: Exception: XML validation failed with:\nArray\n(\n [0] => LibXMLError Object\n (\n [level] => 2\n [code] => 1871\n [column] => 0\n [message] => Element '{http://pkp.sfu.ca}affiliation': Missing child element(s). Expected is ( {http://pkp.sfu.ca}name...

The last message is explained in this post Native XML Plugin issue - #4 by DeMiro5001 , but what’s “agency” in the previous two?

PS I recognize that time passes and requirements that apply to the article metadata change, but the whole issue still looks a bit like “an OJS update has rendered all our publications invalid from its point of view”…

Hi @voffch, thanks for the report - it looks like this is a bug introduced in 3.5.0-4. I’ve filed this in GitHub and plan to fix it for our 3.5.0-5 release, and will share a patch you can apply here once it’s available.

Hello again @voffch,

Here is a patch you can apply locally in lib/pkp if you are comfortable doing so and would like the fix immediately - otherwise this will be available in the OJS 3.5.0-5 release.

https://patch-diff.githubusercontent.com/raw/pkp/pkp-lib/pull/12750.patch