[OJS 3.3.0.3] Errors when trying to export issues

I’m trying to export the issues of one of the journals so that this journal can be migrated to another site, but some of the issues are giving me errors like:

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}issue’: Missing child element(s). Expected is ( {http://pkp.sfu.ca}articles ).

The issues giving these errors were publish back in 2.x before we migrated to 3.x, so I’m not sure if there is something missing, and what could possibly be missing. Would an Unpublish issue followed by a republish fix that?

Hi @luizborges,

What specific version are you exporting from (e.g. 3.3.0-8)?

-Roger
PKP Team

It is 3.3.0.3, my mistake I usually put that information on the title.

Hello @rcgillis and all … we are fracing the same problem with our 3.3.0.6 installation … some of the issues from one of our journals are exported without problems but others present the same validation errors shown by @luizborges

We found out that the same issues that cannot be exported via XML native plugin report errors at the PK Preservation Network plugin … maybe they are related and have the same cause?

In any case … is there a way to solve the problem?

A little update … I have updated the OJS installation to 3.3.0.8 on a test server (with PHP 7.4 instead of PHP 7.3) and the problem is still present with the same issues.

I run into the same problem. See also the posts here:

Any solution for this issue?

-Armin

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

Investigating all the posts related We have found that there are two causes for the “validation error” problem … One is related to missing files from the server’s drive that were deleted and for some reason still referenced at the database … this causes the filesize = " validation error and is often solved creating a dummy file that replaces the missing one

The other cause is something related to files that have missing information about it’s stage

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 with this

select * 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 are defined

Any help would be very useful

1 Like

Hi hilongo

file_stage is defined in

pkp-lib/classes/submissionFile/SubmissionFile.inc.php

But “fair_copy” seems to be removed. See also:

BTW. There is a typo in your second sql statement. I guess it should be

select * from submission_files where file_id=2063;

1 Like

Thanks a lot @aguen ! … You are right, “fair_copy” is not defined anymore …

I changed the file_stage to “15” in all the rows that had a “7” in our test installation and the problem seems to be fixed… Of course I’ll have to check all the cases (around 89 entries) but we are a lot closer now

Typo fixed :wink:

Best regards!