Ojs 3.2.03 import Uncaught Error: Call to a member function getData() on nullor

Hi,
I’m running ojs 3.2.0.3

When trying to do an native import. I get the error below.

PHP Fatal error: Uncaught Error: Call to a member function getData() on null in /var/www/sites/ojs3-test/classes/search/ArticleSearchIndex.inc.php:38\nStack trace:\n#0 /var/www/sites/ojs3-test/plugins/importexport/native/filter/NativeXmlArticleFilter.inc.php(61): ArticleSearchIndex->submissionMetadataChanged(Object(Submission))\n#1 /var/www/sites/ojs3-test/lib/pkp/classes/filter/Filter.inc.php(449): NativeXmlArticleFilter->process(Object(DOMDocument))\n#2 /var/www/sites/ojs3-test/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(260): Filter->execute(Object(DOMDocument))\n#3 /var/www/sites/ojs3-test/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(238): NativeXmlIssueFilter->parseArticle(Object(DOMElement), Object(Issue))\n#4 /var/www/sites/ojs3-test/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(134): NativeXmlIssueFilter->parseArticles(Object(DOMElement), Object(Issue))\n#5 /var/www/sites/ojs3-test/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(90): NativeXmlIssueFilte in /var/www/sites/ojs3-test/classes/search/ArticleSearchIndex.inc.php on line 38

After running the import obviously nothing get’s imported but then I always get the following error when going to the import plugin. Reloading the page doesn’t help.
image

The error log then has the entry below.
PHP Fatal error: Uncaught Error: Call to a member function getLocalizedAcronym() on null in /var/www/sites/ojs3-test/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^642608917fb21577c3f7235b556979f3e7c86b25_0.app.controllersgridtaskstask…php:32\nStack trace:\n#0 /var/www/sites/ojs3-test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5edfc0a8cefd26_69845844(Object(Smarty_Internal_Template))\n#1 /var/www/sites/ojs3-test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))\n#2 /var/www/sites/ojs3-test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))\n#3 /var/www/sites/ojs3-test/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)\n#4 /var/www/sites/ojs3-test/lib/pkp/lib/vendor/smart in /var/www/sites/ojs3-test/cache/t_compile/0a2fd5de575587bfde917e697de9c2aa5619a9d2^642608917fb21577c3f7235b556979f3e7c86b25_0.app.controllersgridtaskstask…php on line 32,

Thanks
Jeremy

Hi @jhennig,

Does the import XML validate against the schema file?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Yes it does validate. I did build the xml myself so it’s likely that there is a mistake that the validation doesn’t catch. I’m going through an export to compare and see if I can catch something.

Jeremy

Hi @jhennig,

That’s probably a good idea. If it helps, it seems from the error message like your submission might not have a publication. OJS 3.2 added versioning, and a submission should have at least one version (the “current” one).

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks! I added the version and status fields in the publication element and it works now.

Jeremy

1 Like

There is another problem that causes this error.
When the section title element tries to change the abbrev of the “Articles” Section the error mentioned above is thrown.
I originally had this in the xml:

<section ref="Refereed">
<abbrev>Refereed</abbrev>
<policy/>
<title>Articles</title>
</section>

But it really should be:

<section ref="ART">
<abbrev>ART</abbrev>
<policy/>
<title>Articles</title>
</section>
1 Like