OJS upgrade error 3.3.0-13 to 3.3.0-21

Describe the issue or problem
I get an error when trying to upgrade from 3.3.0-13 to 3.3.0-21.
I am running PHP 8.0.30.

Steps I took leading up to the issue

  1. Go to the main page to log in. And I got the errors.

What application are you using?
OJS 3.3.0-21

Additional information
It shows me these errors:

[11-Jul-2025 08:28:05 America/Winnipeg] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in
/var/www/ccl-3.3.0-21/lib/pkp/classes/core/DataObject.inc.php:133
Stack trace:
#0 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/SchemaDAO.inc.php(249): DataObject->setData()
#1 /var/www/ccl-3.3.0-21/lib/pkp/classes/submission/PKPAuthorDAO.inc.php(134): SchemaDAO->_fromRow()
#2 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(100): PKPAuthorDAO->_fromRow()
#3 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultIterator.inc.php(33): DAOResultFactory->next()
#4 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(182): DAOResultIterator->__construct()
#5 /var/www/ccl-3.3.0-21/lib/pkp/classes/services/PKPAuthorService.inc.php(69): DAOResultFactory->toIterator()
#6 /var/www/ccl-3.3.0-21/lib/pkp/classes/publication/PKPPublicationDAO.inc.php(62): PKP\Services\PKPAuthorService->getMany()
#7 /var/www/ccl-3.3.0-21/classes/publication/PublicationDAO.inc.php(39): PKPPublicationDAO->_fromRow()
#8 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(100): PublicationDAO->_fromRow()
#9 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultIterator.inc.php(33): DAOResultFactory->next()
#10 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(182): DAOResultIterator->__construct()
#11 /var/www/ccl-3.3.0-21/lib/pkp/classes/services/PKPPublicationService.inc.php(80): DAOResultFactory->toIterator()
#12 /var/www/ccl-3.3.0-21/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(93): PKP\Services\PKPPublicationService->getMany
()
#13 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(100): PKPSubmissionDAO->_fromRow()
#14 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultIterator.inc.php(33): DAOResultFactory->next()
#15 /var/www/ccl-3.3.0-21/lib/pkp/classes/db/DAOResultFactory.inc.php(182): DAOResultIterator->__construct()
#16 /var/www/ccl-3.3.0-21/lib/pkp/classes/services/PKPSubmissionService.inc.php(108): DAOResultFactory->toIterator()
#17 /var/www/ccl-3.3.0-21/pages/issue/IssueHandler.inc.php(323): PKP\Services\PKPSubmissionService->getMany()
#18 /var/www/ccl-3.3.0-21/pages/issue/IssueHandler.inc.php(104): IssueHandler::_setupIssueTemplate()
#19 /var/www/ccl-3.3.0-21/lib/pkp/classes/core/PKPRouter.inc.php(397): IssueHandler->view()
#20 /var/www/ccl-3.3.0-21/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()
#21 /var/www/ccl-3.3.0-21/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()
#22 /var/www/ccl-3.3.0-21/lib/pkp/classes/core/PKPApplication.inc.php(360): Dispatcher->dispatch()
#23 /var/www/ccl-3.3.0-21/index.php(68): PKPApplication->execute()
#24 {main}
thrown in /var/www/ccl-3.3.0-21/lib/pkp/classes/core/DataObject.inc.php on line 133

Please help!
thanks

Hello @rcgillis,

Would you be able to give me some help with troubleshooting this issue? Thanks so much.

Hi @Ptran,

You probably have some bad data in your database. Try the following SQL query:

SELECT a.setting_name
FROM author_settings a
JOIN author_settings b ON (a.setting_name = b.setting_name)
WHERE (a.locale IS NOT NULL AND a.locale <> '')
AND (b.locale IS NULL OR b.locale = '');

Regards,
Alec Smecher
Public Knowledge Project Team

Hello Asmecher,

I ran your query and obtained the output. Please see the result below:

It looks like there’s a lot of empty data under “biography”

Hi @Ptran,

The biography setting is localized, meaning it can be entered in multiple languages. All entries in the author_settings table with setting_name=’biography' should have something in the locale column.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Asmecher,

I listed all the columns under author_settings. Could ‘en_US’ be added as the value for locale?

thanks

-PT

Hi @Ptran,

For entries with setting_name=’country’, the locale column should be empty. Not all settings are localized, and locale should only be filled in for those that are.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello Asmecher,

If I understood you correctly, only entries with setting_name = ‘biography’ that have an empty locale can be filled with ‘en_US’

I came up with this query to search for all the rows where setting_name is ‘biography’ and the locale value is empty.

As a result, are those the entries that need to be filled by the query below? Please let me know if my query is correct?

UPDATE ccl SET locale = ‘en_US’ WHERE setting_name = ‘biography’ AND locale IS NULL OR locale = ‘ ‘;

Thanks

-PT

Hi @Ptran,

Yes, that query looks correct to me. If you run into duplicates – e.g. cases where there is a biography entry for a given author_id with locale = 'en_US' and another with locale = '' – you may need to resolve them before the query will work.

As always, make sure to take a good backup before modifying the database directly!

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi Asmecher,

I found out that it has many duplicate entries, as you mentioned. I was able to resolve the issue by deleting the duplicate entries. Thanks so much for all your help!

DELETE FROM author_settings
WHERE setting_name = ‘biography’ AND locale = ‘ ’
AND author_id IN (
SELECT author_id
FROM author_settings
WHERE setting_name = ‘biography’ AND locale = ‘en_US’
);

1 Like

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