Issue in XML Native plugin Import

Hello:

I have a question about the XML native plugin in OJS 3.3.0.12,when I try lo load al XML:
It loads well, but when I review it, I verify that the PDFs uploaded as galleys are repeated. I have seen that in any article, the PDF link takes you to the first of all those that have been uploaded.
In the files folder, it creates only the first folder too.
Is this a bug that has been resolved?
Kind regards and thanks very much.
J

Here is an example of this XML:

<?xml version="1.0"?>
<issue xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" published="1" current="0" access_status="0" url_path="" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
  <id type="internal" advice="ignore">2671</id>
  <issue_identification>
    <number>0</number>
    <year>1990</year>
  </issue_identification>
  <date_published>1990-07-12</date_published>
  <date_notified>1990-07-12</date_notified>
  <last_modified>2023-11-27</last_modified>
  <sections>
    <section ref="ART" seq="1" editor_restricted="0" meta_indexed="1" meta_reviewed="1" abstracts_not_required="0" hide_title="0" hide_author="0" abstract_word_count="300">
      <id type="internal" advice="ignore">30</id>
      <abbrev locale="en_US">ART</abbrev>
      <abbrev locale="eu_ES">ART</abbrev>
      <title locale="en_US">Article</title>
      <title locale="eu_ES">Artikuluak</title>
    </section>
  </sections>
  <covers>
    <cover locale="es_ES">
      <cover_image>Uztaro0.jpg</cover_image>
      <cover_image_alt_text/>
      <embed encoding="base64">(..base64..)</embed>
    </cover>
  </covers>
  <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" locale="eu_ES" date_submitted="2023-11-27" status="3" submission_progress="0" current_publication_id="26259" stage="production">
      <id type="internal" advice="ignore">26309</id>
      <submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="6708" created_at="2023-11-27" date_created="" file_id="3249" stage="proof" updated_at="2023-11-27" viewable="true" genre="Texto del art&#xED;culo" uploader="admin" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <name locale="eu_ES">PDF</name>
        <file id="3249" filesize="357090" extension="PDF">
          <embed encoding="base64">(..base64..)</embed>
        </file>
      </submission_file>
      <publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="eu_ES" version="1" status="3" primary_contact_id="700" url_path="" seq="0" section_ref="ART" access_status="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <id type="internal" advice="ignore">26259</id>
        <title locale="eu_ES">Konstituzioaren kontzeptua, sorrera eta bilakaera</title>
        <abstract locale="eu_ES">&lt;p&gt;Konstituzioa estatuak gauzatzeko eta berauen baitan sortzen diren arazo eta gatazkak bideratzeko dagoen tresnarik garrantzitsuena da, beste lege guztiak haren azpian daudelarik. Bi edukin nagusitu ditu, herritarren eskubideak batetik eta erakundeen konposaketa, ahalbideak eta iharduera bestetik.&lt;/p&gt;&lt;p&gt;Gaur ulertzen dugun konstituzioa, hots, testu idatzia, aldatzeko zailtasunekin eta botere guztiak mugatzen dituena, estatu liberalarekin sortzen bada ere, beraren aztarnak luzeak dira. Hain zuzen egileak artikulu honetan haren bilakaera historian zehar aztertzen du, hasi Grezia klasiko eta Erromatik eta gaur egun arte iritsiz. Arreta bereziaz jorratzen dira lehen konstituzioak, hau da, britainiarra, amerikarra eta 1791.eko frantziarra eta XIX. eta XX. mendeetako europarrak.&lt;/p&gt;&lt;p&gt;Halaber, bilakabidearen aro desberdin nagusiak deskribatzen dira, hots, monarkia konstituzionala, monarkia parlamentarioa, Sobiet Batasunako konstituzio iraultzailea, konstituzio demokratikoak,... Bigarren Mundu-Gerra ostean sortuko diren konstituzio demokratiko-liberal eta sozialistek hartuko duten indarra azpimarratzen da. Amaitzeko, konstituzio-ereduen etorkizuna azaltzen da.&#xC2; &lt;/p&gt;</abstract>
        <copyrightHolder locale="eu_ES">Uztaro</copyrightHolder>
        <copyrightYear>1990</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="##default.groups.name.author##" seq="0" id="35468">
            <givenname locale="en_US">I&#xF1;igo</givenname>
            <givenname locale="eu_ES">I&#xF1;igo</givenname>
            <familyname locale="en_US">Lamarka Iturbe</familyname>
            <familyname locale="eu_ES">Lamarka Iturbe</familyname>
            <email/>
          </author>
        </authors>
        <article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="eu_ES" url_path="" approved="false" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <id type="internal" advice="ignore">25776</id>
          <name locale="eu_ES">PDF</name>
          <seq>0</seq>
          <submission_file_ref id="6708"/>
        </article_galley>
        <pages>111-121</pages>
      </publication>
    </article>
    <article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="eu_ES" date_submitted="2023-11-27" status="3" submission_progress="0" current_publication_id="26260" stage="production">
      <id type="internal" advice="ignore">26310</id>
      <submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="6709" created_at="2023-11-27" date_created="" file_id="3250" stage="proof" updated_at="2023-11-27" viewable="true" genre="Texto del art&#xED;culo" uploader="ibaiscanbit" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <name locale="eu_ES">A-384 (1).pdf</name>
        <file id="3250" filesize="79616" extension="pdf">
          <embed encoding="base64">(..base64..)</embed>
        </file>
        <file id="3249" filesize="357090" extension="PDF">
          <embed encoding="base64">(..base64..)</embed>
        </file>
      </submission_file>
      <publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="eu_ES" version="1" status="3" primary_contact_id="700" url_path="" seq="0" date_published="2023-11-27" section_ref="ART" access_status="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <id type="internal" advice="ignore">26260</id>
        <title locale="eu_ES">title</title>
        <abstract locale="eu_ES">&abstract</abstract>
        <copyrightHolder locale="eu_ES">Uztaro</copyrightHolder>
        <copyrightYear>1990</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="##default.groups.name.author##" seq="0" id="35469">
            <givenname locale="en_US">I&#xF1;aki</givenname>
            <givenname locale="eu_ES">I&#xF1;aki</givenname>
            <familyname locale="en_US">Gaminde Terraza</familyname>
            <familyname locale="eu_ES">Gaminde Terraza</familyname>
            <email/>
          </author>
        </authors>
        <article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="eu_ES" url_path="" approved="false" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <id type="internal" advice="ignore">25777</id>
          <name locale="eu_ES">PDF</name>
          <seq>0</seq>
          <submission_file_ref id="6709"/>
        </article_galley>
        <pages>85-97</pages>
      </publication>
    </article>
  </articles>
</issue>

Hi!
Element <submission_file> has attribute file_id = " " and when it corresponds to child <file id=" " import works.
I didn’t find xml example for import old issues to ojs 3.4, so try-checked different variants, and succeeded with this:

<?xml version="1.0" encoding="utf-8"?>
<issues xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
	<issue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" published="1" current="0" access_status="1">
		<id type="public" advice="update">0000-0000-5-3</id>
		<description locale="ru">Журнал том 5 № 3 2013</description>
		<description locale="en">Journal vol. 5 No. 3 2013</description>
		<issue_identification>
			<volume>5</volume>
			<number>3</number>
			<year>2013</year>
			<title locale="ru">Журнал том 5 № 3 2013</title>
			<title locale="en">Journal vol. 5 No. 3 2013</title>
		</issue_identification>
		<date_published>2013-09-20</date_published>
		<last_modified>2013-09-20</last_modified>
		<sections>
			<section seq="2" abstract_word_count="0">
				<abbrev locale="en">THEORY</abbrev>
				<abbrev locale="ru">THEORY</abbrev>
				<title locale="en">THEORY</title>
				<title locale="ru">ТЕОРИЯ</title>
			</section>
			<section seq="3" abstract_word_count="0">
				<abbrev locale="en">NATURE</abbrev>
				<abbrev locale="ru">NATURE</abbrev>
				<title locale="en">NATURE</title>
				<title locale="ru">ПРИРОДА</title>
			</section>
		</sections>
		<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" locale="ru" date_submitted="2013-09-20" status="3" submission_progress="0" stage="production" current_publication_id="1">
				<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="1" stage="proof" created_at="2013-09-20" updated_at="2013-09-20" viewable="true" genre="Article Text" uploader="oleg" file_id="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
					<name locale="ru">NameForReader(Downloader)</name>
					<file id="1" filesize="8297738" extension="pdf">
						<href src="files/file.pdf"/>
					</file>
				</submission_file>
				<publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1" status="3" section_ref="THEORY" seq="0" date_published="2013-09-20" access_status="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd" primary_contact_id="0">
					<id type="internal" advice="ignore">1</id>
					<title locale="ru">Название статьи</title>
					<title locale="en">Title Of Article</title>
					<abstract locale="ru">Аннотация</abstract>
					<abstract locale="en">Abstract</abstract>
					<licenseUrl>https://creativecommons.org/licenses/by-nc-nd/4.0</licenseUrl>
					<copyrightHolder locale="en">Journal</copyrightHolder>
					<copyrightHolder locale="ru">Журнал</copyrightHolder>
					<copyrightYear>2013</copyrightYear>
					<keywords locale="ru">
						<keyword>почва</keyword>
						<keyword>мегаполис</keyword>
					</keywords>
					<keywords locale="en">
						<keyword>soil</keyword>
						<keyword>megalopolis</keyword>
					</keywords>
					<authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
						<author id="0" seq="1" user_group_ref="Author" primary_contact="true">
							<givenname locale="ru">А.А.</givenname>
							<givenname locale="en">A.A.</givenname>
							<familyname locale="ru">Фамилия</familyname>
							<familyname locale="en">FamilyName</familyname>
							<affiliation locale="ru">Университет</affiliation>
							<affiliation locale="en">University</affiliation>
							<country>RU</country>
							<email>noreply@univ.edu</email>
						</author>
						<author id="0" seq="2" user_group_ref="Author" primary_contact="false">
							<givenname locale="ru">Б.Б.</givenname>
							<givenname locale="en">B.B.</givenname>
							<familyname locale="ru">Фамилия</familyname>
							<familyname locale="en">FamilyName</familyname>
							<affiliation locale="ru">Аффилиация</affiliation>
							<affiliation locale="en">Affiliation</affiliation>
							<country>RU</country>
							<email>noreply@univ.edu</email>
						</author>
					</authors>
					<article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="ru" url_path="" approved="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
						<name locale="ru">PDF</name>
						<seq>0</seq>
						<submission_file_ref id="1"/>
					</article_galley>
					<citations>
						<citation>Литература</citation>
						<citation>Статья</citation>
					</citations>
				</publication>
			</article>
			<article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="ru" date_submitted="2013-09-20" status="3" submission_progress="0" stage="production" current_publication_id="1">
				<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="1" stage="proof" created_at="2013-09-20" updated_at="2013-09-20" viewable="true" genre="Article Text" uploader="oleg" file_id="2" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
					<name locale="ru">OtherNameForReader.pdf</name>
					<file id="2" filesize="807942" extension="pdf">
						<href src="files/otherfile.pdf"/>
					</file>
				</submission_file>
				<publication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1" status="3" section_ref="NATURE" seq="0" date_published="2013-09-20" access_status="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd" primary_contact_id="0">
					<id type="internal" advice="ignore">1</id>
					<title locale="ru">Название следующей статьи</title>
					<title locale="en">Next Article Title</title>
					<abstract locale="ru">Аннотация</abstract>
					<abstract locale="en">Abstract</abstract>
					<licenseUrl>https://creativecommons.org/licenses/by-nc-nd/4.0</licenseUrl>
					<copyrightHolder locale="en">Journal</copyrightHolder>
					<copyrightHolder locale="ru">Журнал</copyrightHolder>
					<copyrightYear>2013</copyrightYear>
					<keywords locale="ru">
						<keyword>система</keyword>
						<keyword>модель</keyword>
					</keywords>
					<keywords locale="en">
						<keyword>system</keyword>
						<keyword>model</keyword>
					</keywords>
					<authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
						<author id="0" seq="1" user_group_ref="Author" primary_contact="true">
							<givenname locale="ru">А.А.</givenname>
							<givenname locale="en">A.A.</givenname>
							<familyname locale="ru">Фамилия</familyname>
							<familyname locale="en">FamilyName</familyname>
							<affiliation locale="ru">Аффилиация</affiliation>
							<affiliation locale="en">Affiliation</affiliation>
							<country>RU</country>
							<email>noreply@univ.edu</email>
						</author>
						<author id="0" seq="2" user_group_ref="Author" primary_contact="false">
							<givenname locale="ru">Б.Б.</givenname>
							<givenname locale="en">B.B.</givenname>
							<familyname locale="ru">Фамилия</familyname>
							<familyname locale="en">FamilyName</familyname>
							<affiliation locale="ru">Университет</affiliation>
							<affiliation locale="en">University</affiliation>
							<country>RU</country>
							<email>noreply@univ.edu</email>
						</author>
					</authors>
					<article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="ru" url_path="" approved="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
						<name locale="ru">PDF</name>
						<seq>0</seq>
						<submission_file_ref id="1"/>
					</article_galley>
					<citations>
						<citation>Литература</citation>
						<citation>Статья</citation>
					</citations>
				</publication>
			</article>
		</articles>
	</issue>
</issues>

With 2 caveats:

  1. import from local file href=" " works in cli mode, not in interface
  2. table ‘event_log’ index constraint to ‘user_id’ table must be deleted for time of import, couldn’t understand for bug of what.

Hope it helps!

I think the issue with even_log is that it expects a valid session which you do not have if you run the import from the command line. I had the same issue but I just commented out a part of the code trying to insert into the event log.

Of course, but it is workaround.
I made Update Repository.php fill missing user_id for cli mode (user_id cons… by Igor-In · Pull Request #9555 · pkp/pkp-lib · GitHub inserting
‘userId’ => $submissionFile->getUploaderUserId(),
in \lib\pkp\classes\submissionFile\Repository.php
(three times in all event entry)

Addition to previously given xml native import example for issues:
it also works from administration panel in interface using full pathnames for galleys, that is

<href src="/wamp/www/journal.ru/files/file.pdf"/>

Hi Igor:
Thanks for your help. Unfortunately, the version i´m working on is the 3.3.0.12.
When I try to import using the “id” tag on the “file” element, i have the resulting error:

PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ueu_ojs.submission_files, CONSTRAINT submission_files_file_id_foreign FOREIGN KEY (file_id) REFERENCES files (file_id))

It seems that when I load an xml with several articles, it only uploads the first PDF, and assigns that file to the rest of the articles, ignoring the “submission_file” elements in the rest of the articles. When looking at the submission_files table on the DB, I see the following:

6817 NULL 26429 10 1 2023-12-04 15:46:09 2023-12-04 15:46:10 25870 25 NULL NULL 553 521 3319
6818 NULL 26430 10 1 2023-12-04 15:46:10 2023-12-04 15:46:10 25871 25 NULL NULL 553 521 3319

The last value on both lines is 3319, wich is the same file for the two articles. In the files folder too, there´s only one file, it seems that the second PDF is not copied to the path.

<issues xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
  <issue published="1">
    <id advice="ignore" type="internal"/>
    <description/>
    <issue_identification>
      <number>0</number>
      <year>1990</year>
    </issue_identification>
    <date_published>1990-07-12</date_published>
    <date_notified>1990-07-12</date_notified>
    <last_modified>1990-07-12</last_modified>
    <sections>
      <section abstract_word_count="0" abstracts_not_required="1" editor_restricted="0" hide_author="1" hide_title="1" meta_indexed="0" meta_reviewed="0" ref="AURKIBIDEA" seq="8">
        <abbrev locale="eu_ES">ART</abbrev>
        <policy locale="eu_ES">Section default policy</policy>
        <title locale="eu_ES">Articles</title>
      </section>
    </sections>
    <covers>
      <cover locale="es_ES">
        <cover_image>Uztaro0.jpg</cover_image>
        <cover_image_alt_text/>
        <embed encoding="base64">...</embed>
      </cover>
    </covers>
    <articles xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
	
	
      <article stage="production">
        <submission_file created_at="1990-12-07" date_created="" genre="Article Text" id="1" stage="proof" updated_at="2023-11-27" uploader="admin" viewable="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <name locale="eu_ES">PDF</name>
          <file filesize="357090" extension="pdf">
            <embed encoding="base64">...</embed>
          </file>
        </submission_file>
        <publication access_status="0" locale="eu_ES" primary_contact_id="700" section_ref="ART" status="3" url_path="" version="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <title locale="eu_ES">Konstituzioaren kontzeptua, sorrera eta bilakaera</title>
          <abstract locale="eu_ES">&lt;p&gt;Konstituzioa estatuak gauzatzeko eta berauen baitan sortzen diren arazo eta gatazkak bideratzeko dagoen tresnarik garrantzitsuena da, beste lege guztiak haren azpian daudelarik. Bi edukin nagusitu ditu, herritarren eskubideak batetik eta erakundeen konposaketa, ahalbideak eta iharduera bestetik.&lt;/p&gt;&lt;p&gt;Gaur ulertzen dugun konstituzioa, hots, testu idatzia, aldatzeko zailtasunekin eta botere guztiak mugatzen dituena, estatu liberalarekin sortzen bada ere, beraren aztarnak luzeak dira. Hain zuzen egileak artikulu honetan haren bilakaera historian zehar aztertzen du, hasi Grezia klasiko eta Erromatik eta gaur egun arte iritsiz. Arreta bereziaz jorratzen dira lehen konstituzioak, hau da, britainiarra, amerikarra eta 1791.eko frantziarra eta XIX. eta XX. mendeetako europarrak.&lt;/p&gt;&lt;p&gt;Halaber, bilakabidearen aro desberdin nagusiak deskribatzen dira, hots, monarkia konstituzionala, monarkia parlamentarioa, Sobiet Batasunako konstituzio iraultzailea, konstituzio demokratikoak,... Bigarren Mundu-Gerra ostean sortuko diren konstituzio demokratiko-liberal eta sozialistek hartuko duten indarra azpimarratzen da. Amaitzeko, konstituzio-ereduen etorkizuna azaltzen da. &lt;/p&gt;</abstract>
          <copyrightHolder locale="eu_ES">Uztaro</copyrightHolder>
          <copyrightYear>1990</copyrightYear>
          <authors>
            <author id="939" seq="0" user_group_ref="##default.groups.name.author##">
              <givenname locale="en_US">Iñigo</givenname>
              <givenname locale="eu_ES">Iñigo</givenname>
              <familyname locale="en_US">Lamarka Iturbe</familyname>
              <familyname locale="eu_ES">Lamarka Iturbe</familyname>
              <email/>
            </author>
          </authors>
          <article_galley approved="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
            <name locale="eu_ES">PDF</name>
            <seq>0</seq>
            <submission_file_ref id="1"/>
          </article_galley>
          <issue_identification>
            <number>0</number>
            <year>1990</year>
            <title locale="eu_ES">Uztaro 0</title>
          </issue_identification>
          <pages>111-121</pages>
        </publication>
      </article>
	  
	  
	  
      <article stage="production">
        <submission_file created_at="1990-12-07" date_created="" genre="Article Text" id="2" stage="proof" updated_at="2023-11-27" uploader="admin" viewable="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <name locale="eu_ES">PDF</name>
          <file extension="pdf" filesize="398282">
            <embed encoding="base64">...</embed>
          </file>
        </submission_file>
        <publication access_status="0" locale="eu_ES" primary_contact_id="700" section_ref="ART" status="3" url_path="" version="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
          <title locale="eu_ES">Industria kulturalaren garapena</title>
          <abstract locale="eu_ES">&lt;p&gt;Kultura eta komunikazioa saio eta eztabaida askoren gaia izan dira, baina gutxitan ekonomiaren ikuspegitik abiatuta. Egungo gizarte kapitalistetan, ordea, kultura eta komunikazioak, produkzioak-prozesuak ere badiren heinean, garrantzi eta pisu ekonomiko hazkorra ari dira hartzen, hedatzen ari den sektore dinamiko baten irudia eskainiz.&lt;/p&gt;&lt;p&gt;Halaber, eta barneratu duen merkantilizazio- eta industrializazio-prozesua dela eta, zaila egiten da kultura eta komunikazioko praktika sozialen garapena eta eboluzioa ulertzea beraien artikulazioa ekonomi egitura industrialetan haintzat hartu gabe.&lt;/p&gt;&lt;p&gt;Errealitate honek derrigorrezkoa egiten du ekonomiaren arreta kultur prozesuen garapenean, baina beti ere horien izaera berezitua, beraien eragin politiko-soziala, ahaztu gabe. &lt;/p&gt;</abstract>
          <copyrightHolder locale="eu_ES">Uztaro</copyrightHolder>
          <copyrightYear>1990</copyrightYear>
          <authors>
            <author id="939" seq="0" user_group_ref="##default.groups.name.author##">
              <givenname locale="en_US">Patxi</givenname>
              <givenname locale="eu_ES">Patxi</givenname>
              <familyname locale="en_US">Azpillaga Goenaga</familyname>
              <familyname locale="eu_ES">Azpillaga Goenaga</familyname>
              <email/>
            </author>
          </authors>
          <article_galley approved="true" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
            <name locale="eu_ES">PDF</name>
            <seq>0</seq>
            <submission_file_ref id="2"/>
          </article_galley>
          <issue_identification>
            <number>0</number>
            <year>1990</year>
            <title locale="eu_ES">Uztaro 0</title>
          </issue_identification>
          <pages>7-19</pages>
        </publication>
      </article>
    </articles>
  </issue>
</issues>

Any help would be much appreciated.

Thank you very much, and best regards,
J

Hi, Joruli!
I checked, my xml was imported to ojs 3.3.0.12 instance successfully with different galleys.
You may try change your last variant closer toward mine, specifically:

<article stage="production" current_publication_id="1">                  - in both occurences 
<submission_file ........ file_id="1">                                                   - in first occurence
<submission_file ........ file_id="2">                                                   - in second occurence
<file id="1"....                                                                                    - in first occurence
<file id="2"....                                                                                    - in second occurence

and insert tag

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

to both publication

As for PDOException, if repeated, it shows inconsistencies in BD, therefore due to return to previous unerratic state/installation.

Hope it helps.

1 Like

Correction. No, it is not true. User in cli mode command MUST preceded by -u switch:
php tools/importExport.php NativeImportExportPlugin import file.xml journal_id -u user