Ojs 3.3.0.9 php8.x-fpm got fatal errors

Description of issue or problem I’m having:
I have updated ojs to latest 3.3.0.9. it is working and OK with php7.4-fpm.

but i got the errors provided below if i switch to the php8.0-fpm.

i have another fresh ojs 3.3.0.9 working with php8.0-fpm on the same server.

Steps I took leading up to the issue:

What I tried to resolve the issue:

**Application Version - e.g., OJS 3.3.0.9

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

Fatal error : Uncaught TypeError: Cannot access offset of type string on string in /var/www/ejpam.com/public_html/lib/pkp/classes/core/DataObject.inc.php:133 Stack trace: #0 /var/www/ejpam.com/public_html/lib/pkp/classes/db/SchemaDAO.inc.php(249): DataObject->setData() #1 /var/www/ejpam.com/public_html/lib/pkp/classes/db/DAOResultFactory.inc.php(94): SchemaDAO->_fromRow() #2 /var/www/ejpam.com/public_html/lib/pkp/classes/db/DAOResultFactory.inc.php(167): DAOResultFactory->next() #3 /var/www/ejpam.com/public_html/classes/template/TemplateManager.inc.php(73): DAOResultFactory->toArray() #4 /var/www/ejpam.com/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php(1247): TemplateManager->initialize() #5 /var/www/ejpam.com/public_html/lib/pkp/classes/plugins/Plugin.inc.php(359): PKPTemplateManager::getManager() #6 /var/www/ejpam.com/public_html/lib/pkp/classes/plugins/Plugin.inc.php(115): Plugin->_registerTemplateResource() #7 /var/www/ejpam.com/public_html/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(28): Plugin->register() #8 /var/www/ejpam.com/public_html/plugins/generic/googleAnalytics/GoogleAnalyticsPlugin.inc.php(23): LazyLoadPlugin->register() #9 /var/www/ejpam.com/public_html/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): GoogleAnalyticsPlugin->register() #10 /var/www/ejpam.com/public_html/lib/pkp/classes/plugins/PluginRegistry.inc.php(142): PluginRegistry::register() #11 /var/www/ejpam.com/public_html/lib/pkp/classes/core/Dispatcher.inc.php(133): PluginRegistry::loadCategory() #12 /var/www/ejpam.com/public_html/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch() #13 /var/www/ejpam.com/public_html/index.php(68): PKPApplication->execute() #14 {main} thrown in /var/www/ejpam.com/public_html/lib/pkp/classes/core/DataObject.inc.php on line 133

Hi @Baris_Kiremitci

My understanding is that OJS 3.3 is not completely compatible with PHP 8, but OJS 3.4 will be.

Best
Jason

1 Like

Hi @Baris_Kiremitci,

OJS 3.3.x is compatible with PHP 8.0 (though not yet 8.1). However, PHP8 is more stringent with some things than 7.x was, and things that used to result in a warning now result in an error. I think you’re running into a data problem – you can help to identify it by using the SQL query at the following thread:

(Before you start working with the database directly, make sure you have a good backup.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
i run the sql query
SELECT DISTINCT a.setting_name FROM journal_settings a JOIN journal_settings b ON (a.setting_name = b.setting_name AND a.locale IS NULL and b.locale IS NOT NULL)

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0024 seconds.)

Hi @Baris_Kiremitci,

How about this SQL query?

SELECT * FROM journal_settings WHERE setting_name IN (
  'about', 'acronym', 'additionalHomeContent', 'announcementsIntroduction',
  'authorGuidelines', 'authorInformation', 'competingInterests', 'contactAffiliation',
  'copyrightHolderOther', 'copyrightNotice', 'customHeaders', 'dateFormatLong',
  'dateFormatShort', 'datetimeFormatLong', 'datetimeFormatShort', 'description',
  'editorialTeam', 'favicon', 'homepageImage', 'librarianInformation', 'name',
  'openAccessPolicy', 'pageFooter', 'pageHeaderLogoImage', 'privacyStatement',
  'readerInformation', 'reviewGuidelines', 'searchDescription',
  'submissionChecklist', 'timeFormat'
) AND (locale IS NULL OR locale = '');

Regards,
Alec Smecher
Public Knowledge Project Team

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