[OJS3.3.0-6] [Urgent] Native xml import/export errors

We are having problem with the plugin currently and will need to use this plugin frequently about 3-6 times a day because of we are archiving newly published issue from the official site to an archive library site. they are both running in the same version of OJS 3.3.0-6.

We have a few tries on those issues created by quicksubmit plugin and they works fine. (both exporting and importing on two sites)

Now today we are trying this plugin on issue not created by quicksubmit plugin (where all submission, review and editor activities are done completely) and we met the following error:

first error is from the plugin itself:

Validation errors:
Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘stage’: [facet ‘enumeration’] The value ‘’ is not an element of the set {‘public’, ‘submission’, ‘note’, ‘review_file’, ‘review_attachment’, ‘final’, ‘fair_copy’, ‘editor’, ‘copyedit’, ‘proof’, ‘production_ready’, ‘attachment’, ‘query’, ‘review_revision’, ‘dependent’}.

Element ‘{http://pkp.sfu.ca}issue’: Missing child element(s). Expected is ( {http://pkp.sfu.ca}articles ).

Invalid XML:

<?xml version="1.0"?> 9496 507 4 16 June 2021 2021-06-16 2021-06-16 30 ART Article

and these are found in the server error log:

[php7:notice] [pid 4890] [client 10.0.246.158:47310] PHP Notice: Undefined offset: 7 in /var/www/html/lib/pkp/plugins/importexport/native/filter/SubmissionFileNativeXmlFilter.inc.php on line 85, referer: https://www.xxx.xx/xxx/management/importexport/plugin/NativeImportExportPlugin

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Sokil\IsoCodes\Database\Countries::getByAlpha2() must be of the type string, null given, called in /var/www/html/pages/search/SearchHandler.inc.php on line 272 and defined in /var/www/html/lib/pkp/lib/vendor/sokil/php-isocodes/src/Database/Countries.php:42\nStack trace:\n#0 /var/www/html/pages/search/SearchHandler.inc.php(272): Sokil\IsoCodes\Database\Countries->getByAlpha2()\n#1 /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php(395): SearchHandler->authors()\n#2 /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()\n#3 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()\n#4 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()\n#5 /var/www/html/index.php(68): PKPApplication->execute()\n#6 {main}\n thrown in /var/www/html/lib/pkp/lib/vendor/sokil/php-isocodes/src/Database/Countries.php on line 42

PHP Fatal error: Uncaught Exception: Could not convert selected objects. in /var/www/html/lib/pkp/classes/plugins/ImportExportPlugin.inc.php:181\nStack trace:\n#0 /var/www/html/plugins/importexport/native/NativeImportExportPlugin.inc.php(294): ImportExportPlugin->displayXMLValidationErrors()\n#1 /var/www/html/plugins/importexport/native/NativeImportExportPlugin.inc.php(211): NativeImportExportPlugin->exportIssues()\n#2 /var/www/html/lib/pkp/pages/management/PKPToolsHandler.inc.php(94): NativeImportExportPlugin->display()\n#3 /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPToolsHandler->importexport()\n#4 /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()\n#5 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()\n#6 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()\n#7 /var/www/html/index.php(68): PKPApplication->execute()\n#8 {main}\n thrown in /var/www/html/lib/pkp/classes/plugins/ImportExportPlugin.inc.php on line 181, referer: https://www.xxx.xxx/xxx/management/importexport/plugin/NativeImportExportPlugin

If this problem is complicate, what code could i change to skip all the metadata from submission to copyediting only export the published metadata? (as on archive site we do not need these data, in fact they are only waste of resources)

Forgot to mention our crossref xml and pubmed xml works fine

additional

All paper imported by this plugin is unable to export crossref and pubmed xml. - where in the xml file generated article tile is missing entirely even you have title in metadata.

also it is not possible to edit imported submission - i know you can not edit published submmision,. but by unpublish the submissions can do that. the error is silimar - there is something that went wrong when importing submissions with the native xml plugin where the tiitle filed looks like no problem unbale to get data from title field nor editing it.

Additional update today:

By importing one issue today gives me 2 duplicated issue (no refresh or re upload). one of them with original number of paper and the other one with double amount of paper!

I am looking forward to see what other bug this plugin has.

@asmecher Alec can i try the modified plugin in the master github?

Still need help on this one please.

Hi @mapress888 … Could you please share your import file (privately if you want)?

The plugin has extensive changes since the OJS version you are using, so changing the code on the master branch will not result to a fix.

Thanks for your reply. @Dimitris_Efstathiou

The error was encountered when we trying to export an XML file.

Thanks for the reply, you mentioned an import also. But, in any case, we will need some more info in order to check the problem. An export of the data you are using could be of value too, if you are ok to share with us.

In your first post I see that there is an invalid XML. Could you please reproduce that XML and send it privately?

Sent download link in PM, thanks in advance! @Dimitris_Efstathiou

I’m having the same issue. If it could be useful I can send my partial xml exported.

still need help please

Any solution for this problem @mapress888 ?

We have the same problem, both in our production 3.3.0.5 and our test 3.3.0.8 servers.

checking the native xml export process from the command line I can pinpoint the file that causes the validation error for a particular article (usually it’s a file that is not present in any stage at the web interface, as it’s been uploaded and deleted at a later time) … even when the file is still present at the correct location in the server’s drive

checking the database with something like this:

select * from files where file_id=2063;

I get

> | file_id | path                                                                       | mimetype                                                                |
> +---------+----------------------------------------------------------------------------+-------------------------------------------------------------------------+
> |    2063 | journals/36/articles/972/submission/fairCopy/972-97-2657-1-7-20171031.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |

And whit this

select submission_f from files where file_id=2063;

I get

> | submission_file_id | source_submission_file_id | submission_id | file_stage | viewable | created_at          | updated_at          | assoc_id | genre_id | direct_sales_price | sales_type | uploader_user_id | assoc_type | file_id |
> +--------------------+---------------------------+---------------+------------+----------+---------------------+---------------------+----------+----------+--------------------+------------+------------------+------------+---------+
> |               2657 |                      NULL |           972 |          7 |        0 | 2017-10-31 09:03:30 | 2017-10-31 09:03:30 |     NULL |       97 | NULL               | NULL       |                1 |       NULL |    2063 |

For some reason … the file_stage value “7” is not producing the correct text “fair_copy” string when the xml export is executed …

I haven’t found the table where the file_stage’s values correspondence is defined

Check this for a possible cause/solution:

Hi @hilongo. Is your issue fixed by changing your DB data? If not so, it can lead to a bug report. What version are you working on right now? Does your problem persist?

Hi @Dimitris_Efstathiou ! … The issue was fixed by changing the DB data :slight_smile:

We are using OJS 3.3.0.8 at the moment