HttpError while importing native xml issue ojs 3.2.0-2

Hello there!
I am facing this “HttpError” issue where I am trying to import an issue exported from the previous version of ojs 3.1.2. File size is 140 MB. I have allowed upto 250 MB. File upload progress completes successfully but at the end this error pops up…
Any help in this regard will be highly appreciated. @asmecher @Vitaliy

image

Regards,
Farhan Abbas

Hi @Farhan_Abbas,

Are there any relevant errors in PHP logs associated with this download? It may clarify the problem.

Nothing in the error logs for this step…
What is the way forward?

Regards,

Does the error with XML import appear only with large files? What is the response for the request (network tab of the browser’s inspect tools)?

I did not check the Network tab for this one. Let me repeat this issue and have the network request status… will be back shortly…

Regards,

image

image

Just an update!
Upon investigating the network tab and request / response messages, I configured the respective length of content in my web.config file and now the size is not an issue. But now, when I click on Import I get the following messages… Please check and let me know what is the issue with that? @Vitaliy
image

It’s XML validation error and it looks like your XML isn’t compatible with OJS 3.2.0-2. E.g., the first 4 attributes that are mentioned in the message should be for publication element, not article according to a schema file. Maybe @asmecher knows if backward compatibility is considered.

Hi all,

No, the XML exported from 3.1.2 won’t be compatible for import into 3.2.0 without some adaptations.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok. What will be the required changes then? @asmecher

Regards,
Farhan

Hi, try this sample.

<?xml version="1.0"?>
<articles xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
  <article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" date_submitted="2020-05-09" status="3" submission_progress="0" current_publication_id="1040" stage="submission">
    <id type="internal" advice="ignore">606</id>
    <submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" stage="production_ready" id="893" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
      <revision number="1" genre="general" filename="origname" viewable="false" date_uploaded="2020-05-09" date_modified="2020-05-09" filesize="534182" filetype="application/pdf" uploader="admin">
        <name locale="en_US">admin, origname.pdf</name>
        <embed encoding="base64">base64</embed>
      </revision>
    </submission_file>
    <publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="ru_RU" version="1" status="3" primary_contact_id="1279" url_path="" seq="15" date_published="2020-05-09" section_ref="&#x441;&#x442;" access_status="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
      <id type="internal" advice="ignore">1040</id>
      <title locale="en_US">My Test Title Example</title>
      <title locale="ru_RU">My Test Title Example</title>
      <abstract locale="en_US">Abstract.</abstract>
      <abstract locale="ru_RU">Аннотация</abstract>
      <keywords locale="ru_RU">
        <keyword>ключевое слово1</keyword>
        <keyword>ключевое слово2</keyword>
      </keywords>
      <keywords locale="en_US">
        <keyword>keyword1</keyword>
        <keyword>keyword2</keyword>
      </keywords>
      <subjects locale="ru_RU">
        <subject>УДК 004.62</subject>
      </subjects>
      <subjects locale="en_US">
        <subject>UDC 004.62</subject>
      </subjects>
      <authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <author include_in_browse="true" user_group_ref="author" seq="1" id="1281">
          <givenname locale="en_US">John</givenname>
          <givenname locale="ru_RU">Джон</givenname>
          <familyname locale="en_US">Doe</familyname>
          <familyname locale="ru_RU">Дое</familyname>
          <affiliation locale="ru_RU">Affiliation1; Affiliation2</affiliation>
          <affiliation locale="en_US">Affiliation1; Affiliation2</affiliation>
          <country>RU</country>
          <email>john.doe@example.com</email>
          <biography locale="en_US">Bio eng</biography>
          <biography locale="ru_RU">Bio rus</biography>
        </author>
      </authors>
      <article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="ru_RU" approved="false" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <id type="internal" advice="ignore">701</id>
        <name locale="ru_RU">PDF</name>
        <seq>0</seq>
        <submission_file_ref id="893" revision="1"/>
      </article_galley>
      <issue_identification>
        <volume>23</volume>
        <number>3</number>
        <year>2020</year>
      </issue_identification>
      <pages>433-450</pages>
      <citations>
        <citation>Doe J. Test citation title // My journal(MJ). 2020. V. 123. Issue 321. Article No 20.</citation>
      </citations>
    </publication>
  </article>
</articles>

If you don’t have some IDs yet, you can simply delete them or set them to zero if necessary, such as the author ID.

@Farhan_Abbas, did you manage to solve this? Have you found the specs for the changes requires to migrate XML files generated in older versions to OJS 3.2.1?
I have not been able to fins the spec file for those changes… I’ld be glad to summarize, but need to figure out those changes… any lead on that? @asmecher ??

thanks!

H

Hi @Horacio_Samaniego,

You can determine the changes required between two OJS releases by comparing the two relevant XML schema files, lib/pkp/plugins/importexport/native/pkp-native.xsd and plugins/importexport/native/native.xsd, between the two versions. You can download the .tar.gz packages for the old and new versions of OJS and compare them there, or if you’re using git, you can do it directly from the git repository. For example, to compare 3.1.2-2 and 3.2.1-0:

git diff 3_1_2-2..3_2_1-0 plugins/importexport/native/native.xsd

(…and similar in the lib/pkp subdirectory for pkp-native.xsd.)

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hello @asmecher and community,
This has been a great suggestion, however, I have had no success in the analysis of the .xsd files. I was wondering if anyone in the community could share an exported issue in the XML Native 3.0.2 version. that could help me compare the tags. I think that I could take it from there and provide a solution hopefully.

Thanks,

H