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
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:
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.
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
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:
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"><p>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.</p><p>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.</p><p>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. </p></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"><p>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.</p><p>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.</p><p>Errealitate honek derrigorrezkoa egiten du ekonomiaren arreta kultur prozesuen garapenean, baina beti ere horien izaera berezitua, beraien eragin politiko-soziala, ahaztu gabe. </p></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>
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.
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