@Vitaliy yes, I’ve seen that before (my mistake, I forgot to mention) and checked the database, I had some ‘primaryLocale’ in the ‘journal_settings’ (no null values) and I removed those. The issues still persists.
Also forgot to mention that I have on the last available OJS installed and this still happens.
In particular, $author->getLocalizedFamilyName() should be a string but according to the message, it returns an array. I’d debug here the same way as in the referenced post but looking at the author_settings table. There may be a duplicate of setting_name => familyName for the same author id (and locale), which leads to returning of multiple values or an invalid entry in setting_value
By the way, this page is deprecated and won’t be used since the next major OJS release
In the meantime, is there something I could/should do? This seems to be only affecting bots, so this is not much of a concern, but can I clean up the database somehow to make it “better”?
A duplicate is unlikely when looking at the unique index in this table, which includes author_id, locale, and setting_name columns. Maybe there is an unusual value for the familyName, which causes the error. But I can’t reproduce it and don’t know exactly what to look for. Are you using the Default theme? If it’s the custom one, which overrides the page, it can also explain the problem if that part of code is modified.
As I don’t know what to look at the database, I’d try to debug it locally by installing OJS from a backup. If it’s possible to reproduce it locally, then, e.g., just add a debugging statement near the line I’ve pointed above. Something like:
{if is_array($author->getLocalizedFamilyName())}
malformed data at author ID: {$author->getId()}
{/if}
The value(s) will be displayed on the search authors index page. And then check the values in the database, e.g., if author ID is 100 and you have only 1 locale:
SELECT * FROM author_settings WHERE author_id = 100 AND setting_name = 'familyName';
If it’s several authors, use WHERE IN instead:
SELECT * FROM author_settings WHERE setting_name = 'familyName' AND WHERE author_id IN (100,101,102);