Problems importing native XML 3.3.0.21

Describe the issue or problem
I have created an XML import file. It worked to import it on my test server, but in production I ran into errors.

This is the error from importExport.php NativeImportExportPlugin

PHP Fatal error:  Uncaught Error: Call to a member function getData() on null in /var/www/html/ecp/classes/search/ArticleSearchIndex.inc.php:38
Stack trace:
#0 /var/www/html/ecp/plugins/importexport/native/filter/NativeXmlArticleFilter.inc.php(61): ArticleSearchIndex->submissionMetadataChanged()
#1 /var/www/html/ecp/lib/pkp/classes/filter/Filter.inc.php(449): NativeXmlArticleFilter->process()
#2 /var/www/html/ecp/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(260): Filter->execute()
#3 /var/www/html/ecp/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(238): NativeXmlIssueFilter->parseArticle()
#4 /var/www/html/ecp/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(134): NativeXmlIssueFilter->parseArticles()
#5 /var/www/html/ecp/plugins/importexport/native/filter/NativeXmlIssueFilter.inc.php(90): NativeXmlIssueFilter->handleChildElement()
#6 /var/www/html/ecp/lib/pkp/plugins/importexport/native/filter/NativeImportFilter.inc.php(60): NativeXmlIssueFilter->handleElement()
#7 /var/www/html/ecp/lib/pkp/classes/filter/Filter.inc.php(449): NativeImportFilter->process()
#8 /var/www/html/ecp/plugins/importexport/native/NativeImportExportPlugin.inc.php(313): Filter->execute()
#9 /var/www/html/ecp/plugins/importexport/native/NativeImportExportPlugin.inc.php(404): NativeImportExportPlugin->importSubmissions()
#10 /var/www/html/ecp/tools/importExport.php(63): NativeImportExportPlugin->executeCLI()
#11 /var/www/html/ecp/tools/importExport.php(69): importExport->execute()
#12 {main}
  thrown in /var/www/html/ecp/classes/search/ArticleSearchIndex.inc.php on line 38

Since there seem to be problems in the indexing I tested the indexing script php tools/rebuildSearchIndex.php resulting in the following:

Clearing index ... done
Indexing "XXX" ... 85 articles indexed
Indexing "YYY" ... 26 articles indexed
Indexing "ZZZ" ... 34 articles indexed
Indexing "AAA" ... 22 articles indexed
Indexing "BBB" ... 66 articles indexed
Indexing "CCC" ... 30 articles indexed
Indexing "DDD" ... PHP Fatal error:  Uncaught Error: Call to a member function getData() on null in /var/www/html/ecp/classes/search/ArticleSearchIndex.inc.php:38
Stack trace:
#0 /var/www/html/ecp/classes/search/ArticleSearchIndex.inc.php(280): ArticleSearchIndex->submissionMetadataChanged()
#1 /var/www/html/ecp/tools/rebuildSearchIndex.php(59): ArticleSearchIndex->rebuildIndex()
#2 /var/www/html/ecp/tools/rebuildSearchIndex.php(75): rebuildSearchIndex->execute()
#3 {main}
  thrown in /var/www/html/ecp/classes/search/ArticleSearchIndex.inc.php on line 38

The “DDD” journal is my current journal I wanted to import articles to.

Steps I took leading up to the issue
For example:

  1. Created XML file
  2. Test-imported it to a test server - that worked
  3. Imported to my production server - got the error above
  4. Tested the reindexation - error above

What application are you using?
For example, OJS 3.3.0-21

Can you please help!!? I wish to publish this issue urgently, and it consists of over 100 articles, so I will not do it manually via Quicksubmit!

I asked Copilot and I could find and get rid of the failing submissions. There was no publication connected to these publications.

The following SQL query gave a list of failing submissions from my try to import XML-files earlier:

SELECT s.submission_id, s.context_id
 FROM submissions s
 LEFT JOIN publications p ON s.current_publication_id = p.publication_id
 WHERE p.publication_id IS NULL;

I deleted them with the deleteSubmissions.php script. And now I could reindex again.

I made som revisions in the XML and the imoport seem to work now!

1 Like

This topic was automatically closed after 10 days. New replies are no longer allowed.