Native export failure OJS 3.0.2: Element '{http://pkp.sfu.ca}revision': This element is not expected

I’m triying to use Native Export in OJS 3.0.2 to export a Issue and I always obtain this to errors:

Element '{http://pkp.sfu.ca}revision': This element is not expected
`Element ‘{http://pkp.sfu.ca}revision’: This element is not expected. Expected is one of ( {http://pkp.sfu.ca}description, {http://pkp.sfu.ca}publisher, {http://pkp.sfu.ca}sponsor, {http://pkp.sfu.ca}date_created, {http://pkp.sfu.ca}source, {http://pkp.sfu.ca}language ).

I managed to follow the error to specific XML elements. The first error is caused by <revision number="1" genre="Data Analysis"...> here:

</revision>
<creator locale="en_US">Cledy Eliana dos Santos</creator>
<description locale="en_US">The aim of our study was to identify a feasible population-based method to estimate the number of people who would benefit from palliative care health services in a Brazilian population. From a series of estimations to get an idea of how many people may be in need of palliative care, it is possible to build a baseline for health system planning and palliative care needs in cancer and non-cancer patients.</description>
<date_created>2017-03-20</date_created>
<language>english</language>
<revision number="1" genre="Data Analysis" filename="Artigo 3_International_Archives of   Medicine_ 20 Mar&#xE7;o 2017.docx" viewable="true" date_uploaded="2017-03-21" date_modified="2017-03-21" filesize="80770" filetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document" user_group_ref="Author" uploader="cledyeliana">

and the second error is caused by <revision number="1" genre="Other" filename="ARTICLE CORRET 22.03.docx"...> here:

  </revision>
  <description locale="en_US">authors</description>
  <revision number="1" genre="Other" filename="ARTICLE CORRET 22.03.docx" viewable="true" date_uploaded="2017-03-24" date_modified="2017-03-24" filesize="64936" filetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document" user_group_ref="Author" uploader="erickaholmes">
    <name locale="en_US">erickaholmes, Author, ARTICLE CORRET 22.03.docx</name>

So, I guess the problem is that all revision elements aren’t put together as XML schema says:

Can someone help me, please?

Hi @aplatanado,

What version of OJS are you using? (Please include this information with your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

I’m sorry. It is OJS 3.0.2

I’ve edited the post to add that information.

Hi @aplatanado

Hmmm… There seem to be a problem with supplementary files. Would it be possible for you to somehow give me your exported XML? If you could figure out which article(s) that is/are, it would be enough to send me only those. Also, you could remove the base64 content and replace any sensible information with a default text. That would be great!

Thanks a lot!
Bozana

Hi @aplatanado

The problem seems to be with several supplementary file revisions – they are not exported correctly. S. this GitHub Issue for a patch: the revision node grouping for supplementary files in native export · Issue #2648 · pkp/pkp-lib · GitHub

Thanks!
Bozana

Ok. Thank you very much!!

Hello,

Have you got fix this issue, I am also facing. Kindly guide me.

Error:

Element ‘{http://pkp.sfu.ca}name’: This element is not expected. Expected is ( {http://pkp.sfu.ca}permit_metadata_edit ).

XML:

<?xml version="1.0" encoding="UTF-8"?>


<user_groups xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://pkp.sfu.ca pkp-users.xsd”>

	<user_group>
		<role_id>14</role_id>
		<context_id>1</context_id>
		<is_default>true</is_default>
		<show_title>true</show_title>
		<permit_self_registration>false</permit_self_registration>
		<name locale="en_US">Press managerxx</name>
		<abbrev locale="en_US">PM</abbrev>
		<stage_assignments />
	</user_group>
	
</user_groups>
<users>
	
	<user>
		<givenname locale="en_US">John</givenname>
		<familyname locale="en_US">Reviewer</familyname>
		<email>altafnagary@gmail.com</email>
		<username>reviewer</username>
		<password is_disabled="false" must_change="false"
			encryption="sha1">
			<value>42667ea2bc04fbe8efdddb6844f858e76e5ca07a</value>
		</password>
		<date_registered>2013-11-05 12:45:23</date_registered>
		<date_last_login>2013-11-05 12:45:23</date_last_login>
		<inline_help>true</inline_help>
		<user_group_ref>Internal Reviewer</user_group_ref>
		<user_group_ref>External Reviewer</user_group_ref>
	</user>
</users>

Hi @altafnagary,

What version of OJS are you using? (Please include this in your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

Sir, I am using OJS 3.1.2 Released. I have inserted users in database table. is it work?

Hi @altafnagary,

I think you’ve somehow mixed some newer code in with your OJS 3.1.2 installation; the permit_metadata_edit attribute/feature is not included in OJS 3.1.2 but it appears to be present in the PHP code that generates your export XML.

Regards,
Alec Smecher
Public Knowledge Project Team