When importing an issue system returns success but only partial data appears on the journal webpage

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.

Hello @Matus_Muransky , also happened it whith me.
I didn’t find how to resolve that problem in database, but I managed contorn this error by editing the code.
In the file:

./lib/pkp/classes/publication/PKPPublication.inc.php

At the line: 168

Replace:
if ($author->getData('userGroupId') === $userGroup->getId()) {

For:
if ($userGroup && $author->getData('userGroupId') === $userGroup->getId()) {

The ideal solution is we discover how to fix it in database, but at the time this resolves.

1 Like

Hello. I discovered now also needs to change the line 149, in the file

./lib/pkp/classes/publication/PKPPublication.inc.php

Replace:
if ($lastUserGroupId === $userGroup->getId()) {

For:
if ($userGroup && $lastUserGroupId === $userGroup->getId()) {

See also: fix error in PKPPublication.inc.php by murilodbva · Pull Request #9267 · pkp/pkp-lib · GitHub