OJS 3307 - An unexpected error has occurred. + Array to string conversion in ../core/PKPString.inc.php on line 421

Hi all,

I have updated an OJS installation from 3114 version to 3307 and everything works fine, I had just to adjust some characters erros in database. Despite of it, I am receiving an error message on Submissions panel page. This alert seems to be shown only on this page from any journal registered in portal.

unexpected-error
An unexpected error has occurred. Please reload the page and try again.

No error log is registered in php-errors or browser console. Actually, one journal has shown a console error:

build.js?v=3.3.0.7:209 TypeError: Failed to execute ‘observe’ on ‘MutationObserver’: parameter 1 is not of type ‘Node’.
at o.connectObserver (build.js?v=3.3.0.7:37)
at o.callAfterEvent (build.js?v=3.3.0.7:37)
at o. (build.js?v=3.3.0.7:37)
at Array. (build.js?v=3.3.0.7:209)
at dt (build.js?v=3.3.0.7:209)

php-error file has just a PHP Notice: Array to string conversion in /lib/pkp/classes/core/PKPString.inc.php on line 421

Everything seems to be working fine on system, but this error message in submission page will disturb users. I have no clue to solve it.

Thanks to anyone.

1 Like

Hi,

I believe this error is related to something about locales. This OJS instalation is a portal with many journals with differents languages activated. Some articles get “Array” value instead of it’s own title depends on active locale. Here is an example:

print-portuguese
Portuguese

print-english
English

print-spanish
Spanish

Hi everyone,

I’ve found the solution for this issue. Many articles had NULL as value at submissions table, locale collumn. The solution was just to update locale collumn from NULL to a valid locale.

A simple solution after many hours reading OJS PHP scripts. Maybe it could be a default validation on update script, to check if submission locale is NULL.

@asmecher

3 Likes