Error when importing using native XML import plugin in 3.2.0.3

Hi @asmecher,
Thank you very much for your reply. I have double-checked the XML schema and I think it is correct. Also tried this test XML and this simplifyed version, but I got the same result:

<?xml version="1.0"?>
<issue xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" published="1" current="1" access_status="1" url_path="" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
  <issue_identification>
    <volume>1</volume>
    <number>2</number>
  </issue_identification>
  <date_published>2020-06-25</date_published>
  <last_modified>2020-06-25</last_modified>
  <sections>
    <section ref="ART" seq="0" editor_restricted="0" meta_indexed="1" meta_reviewed="1" abstracts_not_required="0" hide_title="0" hide_author="0" abstract_word_count="0">
      <id type="internal" advice="ignore">45</id>
      <abbrev locale="en_US">ART</abbrev>
      <policy locale="en_US">Section default policy</policy>
      <title locale="en_US">Articles</title>
    </section>
  </sections>
  <issue_galleys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd"/>
  <articles 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-06-25" status="3" submission_progress="0" current_publication_id="6" stage="production">
      <publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="en_US" version="1" status="3" primary_contact_id="16" url_path="" seq="0" date_published="2020-06-25" section_ref="ART" access_status="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <title locale="en_US">title2</title>
        <abstract locale="en_US">&lt;p&gt;abstract&lt;/p&gt;</abstract>
        <copyrightHolder locale="en_US">blaaa</copyrightHolder>
        <copyrightYear>2020</copyrightYear>
        <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="0" id="16">
            <givenname locale="en_US">name3</givenname>
            <familyname locale="en_US">name5</familyname>
            <country>SE</country>
            <email>bla@bla.com</email>
          </author>
        </authors>
        <pages>3</pages>
      </publication>
    </article>
  </articles>
</issue>

Thanks for your help. Regards,
Daniel

Hi @celuloide,

At a glance, it looks like the article refers to current_publication_id="6" but the publication node doesn’t have an id (which presumably should be 6).

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher,

That makes sense to me, but I have tried adding id="6", current_publication_id="6" and publication_id="6" but it always gives a validation error because that attribute is not allowed.

I have read your post about the two important XSD files that define the XML schema (NativeXML validation errors - #4 by asmecher) and between the attributes of publication I don’t see any id listed except primary_contact_id.

Captura de pantalla 2021-04-09 a las 20.26.28

Do you think I’m doing something wrong?

Kind regards,
Daniel

Hi @celuloide,

See pkp-lib/pkp-native.xsd at stable-3_2_1 · pkp/pkp-lib · GitHub I think you just need something like:

<publication id="6" ...>

Regards,
Alec Smecher
Public Knowledge Project Team

Yes @asmecher,
I tried also <publication id="6" ...> but it shows the same validation error ‘The attribute is not allowed’…

Hi @celuloide,

The ID for the publication may need to be specified more like this inside the publication element…

<id type="internal" advice="ignore">6</id>

(Using an export document for comparison would be a good way to double-check, I think.)

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher,
Unfortunately it does not work. The actual files I need to migrate were exported from another OJS 3.2.0-2 (the same version) and they all have the <id> as you suggest, inside <publication>.

I don’t mind if I have to edit every single submission in XML files, but I cannot find a XML schema that works in OJS 3.2.0-2’s native import.

Captura de pantalla 2021-04-12 a las 19.24.55

Captura de pantalla 2021-04-12 a las 19.26.21

Kind regards,
Daniel

Hi @asmecher
On this video you can see what happens if I export an article with the native plugin and try to import it back on the same OJS.

Please can you help me?
Many thanks,

Daniel
@celuloide

Hi @Celuloide,

could you share (privately if you like) the export file? It could be one of those things:

  1. The submission does not have an active publication (which is unlikely)
  2. For some reason the import process fails to import the current publication, which results to a submission with no publications, thus the error message you encounter.

One additional thing that could help is whether any PHP errors happen as the import process takes place.

Hi @celuloide. I have not heard from you since the initial post. What OJS version do you use right now? Does your problem persist?