Native XML Import test fails with no results in OJS 3.2.1-4

Description of issue or problem I’m having:

I have an XML file that validates with the given XML schema for version OJS 3.2.1-4. However, when I attempt to load the file, no results are posted on the results tab after performing the import. When I check the submissions, there is a single submission for the issue. However, none of the issue_identification metadata is loaded and several pieces of article metadata are missing. I’m sure I’m missing something obvious, but I can seem to identify the problem.

Steps I took leading up to the issue:

  • Create a new OJS site
  • Create a new OJS journal
  • Upload sample XML file using Native XML import plugin

What I tried to resolve the issue:

After the initial failure to load the test XML file (consisting of two issues and multiple articles for each issue), I removed content so that the test file would only contain a single issue with a single article for that issue. When the import continued to result in the same behavior as described above, I removed the article elements and metadata (leaving an empty <articles> element).

When this failed, I compared the content of the test issue XML to the example XML file. I added the id element as a child element to the issue element, and the issue metadata imported properly. Having made progress to import an issue, I then added the article metadata back to the text XML. The import failed again with no results displayed.

Application Version - e.g., OJS 3.1.2:

OJS 3.2.1-4

Additional information, such as screenshots and error log messages if applicable:

There are several attributes not present in the test XML that are present in the example XML file linked above, but many don’t seem to be required to be valid according to the OJS-defined schema. I don’t know which ones are necessary for the import to succeed. I have tested adding several attributes one at a time, but I’ve yet to succeed in fully uploading an issue/article XML file with the changes I’ve made.

Below are the contents of the XML file I’ve been using to test whether the metadata structure I’m using will work (I’ve used placeholder data in for the author names, submission file URL, and base64 string):

<?xml version="1.0"?>
<issues xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
	<issue current="0" published="1">
		<id type="internal" advice="ignore">1</id>
		<issue_identification>
			<volume>22</volume>
			<number>3</number>
			<year>2019</year>
			<title>Fall2019-22-3</title>
		</issue_identification>
		<date_published>2019-10-01</date_published>
		<sections>
			<section ref="ART">
				<id type="internal" advice="ignore">1</id>
				<abbrev>ART</abbrev>
				<title>Articles</title>
			</section>
		</sections>
		<covers>
			<cover>
				<cover_image>FC_2019v40n1.jpg</cover_image>
				<cover_image_alt_text/>
				<embed encoding="base64" mime_type="image/jpeg">asldkfjasl;dkfnzudcvoaiwefrjlzskdmcvlasjdhfk;asdjflaskdjlak//</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" current_publication_id="9" stage="production">
				<id type="internal" advice="ignore">9</id>
				<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="9" stage="submission" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
					<revision number="1" genre="Article Text" filename="TOC_2019v40n1.pdf" filetype="application/pdf" uploader="admin">
						<name locale="en_US">TOC_2019v40n1.pdf</name>
						<href mime_type="application/pdf" src="http://example.com"/>
					</revision>
				</submission_file>
				<publication date_published="2019-10-01" section_ref="ART" seq="1">
					<id type="internal" advice="ignore">9</id>
					<title>Table of Contents</title>
					<authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
						<author id="1" seq="1" user_group_ref="Author">
							<givenname locale="en_US">Jane</givenname>
							<familyname locale="en_US">Doe</familyname>
							<affiliation>photographer</affiliation>
							<email></email>
						</author>
						<author id="1" seq="2" user_group_ref="Author">
							<givenname locale="en_US">John</givenname>
							<familyname locale="en_US">Doe</familyname>
							<affiliation>photographer</affiliation>
							<email></email>
						</author>
					</authors>
					<article_galley>
						<id type="internal" advice="ignore">1</id>
						<name>PDF</name>
						<seq>1</seq>
						<submission_file_ref id="9"/>
					</article_galley>
					<pages>1</pages>
				</publication>
			</article>
		</articles>
	</issue>
</issues>

Below are a couple of screenshots showing the blank issue metadata after the import is performed.

ojs_import_issue_001

ojs_import_issue_002

1 Like

Having the same problem @jrmitchell have you managed to solve it? Thanks in advance!

To provide some details. Im exporting whole issue from one OJS instance and importing in to another. Both are v3.3.0-14. When i execute the import via cli or web, it returns a success but on the page there is only the issue galley and exactly one article without the link to galley and also no contributor information. The galley file itself is accessible only through dashboard. In the dashboard UI it seems everything is ok except for contributor metadata which are missing.

I checked the error logs:
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/publication/PKPPublication.inc.php:168\nStack trace:\n#0 /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/submission/PKPSubmission.inc.php(423): PKPPublication->getAuthorString()\n#1 /var/www/ojs/ojs-3.3.0-14/cache/t_compile/e26d2de610226743d9feff244fb14ef53700227f^7cf1cd52b8ba8108de77f197078de34b733dd394_0.app.frontendobjectsarticlesum.php(75): PKPSubmission->getAuthorString()\n#2 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_647f31df7ef445_58998653()\n#3 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#4 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#5 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/sm in /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/publication/PKPPublication.inc.php on line 168, referer: https://blr.flaw.uniba.sk/index.php/AFI/user/authorizationDenied?message=user.authorization.invalidIssue

PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/publication/PKPPublication.inc.php:168\nStack trace:\n#0 /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/submission/PKPSubmission.inc.php(423): PKPPublication->getAuthorString()\n#1 /var/www/ojs/ojs-3.3.0-14/cache/t_compile/e26d2de610226743d9feff244fb14ef53700227f^7cf1cd52b8ba8108de77f197078de34b733dd394_0.app.frontendobjectsarticlesum.php(75): PKPSubmission->getAuthorString()\n#2 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_647f31df7ef445_58998653()\n#3 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#4 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#5 /var/www/ojs/ojs-3.3.0-14/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/sm in /var/www/ojs/ojs-3.3.0-14/lib/pkp/classes/publication/PKPPublication.inc.php on line 168, referer: https://blr.flaw.uniba.sk/index.php/AFI/issue/view/26

Does someone have any idea what could be wrong pls?

Thanks in advance.