[SOLVED] Ojs3 issue archive is empty

If I open any of my journals archive (for example https://lmaleidykla.lt/ojs33/index.php/chemija/issue/archive ), it is empty, although the line count is correct (in this case 2, it corresponds to a number of issues).
No errors in httpd log when opening the above URL.

It is not empty, but all the issue details are missing. They are also missing from the “current” page - only the publish date is visible there. If you look at the source code of the archive page, you can see that the links leading to the issues are there. Just no text inside the link tags.

Go to Issues > Back issues and edit one of the issues and see what it says on the issue details page.

The following fields are filled in Issue Data:
Date Published: 2018-03-22
Identification
Volume: 29
Number: 1
Year: 2018

Title and Description are empty. If I don’t change anything and press Save, it shows:
Errors occurred processing this form
Title is required for the issue.
Why is it so? I assume OJS 2.4.8 automatically generated title, as Browse by issue shows: “Vol 29, No 1 (2018)”. If I enter it as the Title, it works then, but it will take a lot of time to edit all the issues manually. Is it possible for OJS3 to autogenerate issue title if it is empty?

You have some contradiction with your journals language settings.

The data you mention is maybe saved using a locale that is not enabled at the moment.

In this journal only English is enabled and used, and English is set as primary locale in site administration.

But yes, I do get some warnings in httpd log (but not when I view issue archives):
PHP Warning: Illegal string offset ‘en_US’ in /var/www/html/ojs33/lib/pkp
/classes/core/DataObject.inc.php on line 133, referer: https://lmaleidykla.lt/ojs33/index.php/chemija/manageIssues
PHP Warning: Illegal string offset ‘lt_LT’ in /var/www/html/ojs33/lib/pkp
/classes/core/DataObject.inc.php on line 133, referer: https://lmaleidykla.lt/ojs33/index.php/chemija/manageIssues

so what settings do you have in Settings > Website > Language. Are all three checkboxes selected for the default locale?

I bet the data you are missing is strored using ‘lt_LT’ locale but now that it is not enabled in the journal, you can not access it.

Yes, all three checkboxes selected for the default locale which is English. Lithuanian is not selected for this journal.
How do I debug this? DataObject.inc.php line 133 is:
$this->_data[$key][$locale] = $value;
If I add var_dump($key); var_dump($locale); var_dump($value); above it, the web page prints a lot of info. How do I print only when PHP warning is issued?

I suggest you open your database with for example phpmyadmin, find the issue_settings table and find values that have the lt_LT locale. What I would do is to replace the lt_LT value there with en_US, because I think there is no Lithuanian translation of OJS3?

To be precise find the values for issue title and description. I am sure there are values there with lt_LT locale.

But I get a warning with en_US too:
PHP Warning: Illegal string offset ‘en_US’ in /var/www/html/ojs33/lib/pkp
/classes/core/DataObject.inc.php on line 133

could be that it just tries to fetch a value for en_US because that is the default locale now. But it can not find a value for that locale because the data is only available in lt_LT => the error.

For this journal there is no lt_LT data, English everywhere. In OJS 2.4.8 Lithuanian was not enabled for this journal.
It was enabled for other journals, I have some messages translated, but it was basically for Lithuanian article submissions.

The error “PHP Warning: Illegal string offset ‘lt_LT’ in /var/www/html/ojs33/lib/pkp
/classes/core/DataObject.inc.php on line 133, referer:” does suggest otherwise.

I think it is worth checking the issue_settings for lt_LT data. Check the issue id numbers and find rows that match the id. There should be a row for the issue title and description. If there are values with lt_LT, replace the value with en_US

You can also try disabling the checkboxes where you choose which elements are shown in the issue identification. I mean remove the checkbox from “title” and save the form.

There is no way of generating all the issue identifications for the whole journal. The quickest way is probably editing the database.

I don’t see anything suspicious:
MariaDB [ojs3]> SELECT * FROM issue_settings ;
±---------±-------±----------------------±--------------------±-------------+
| issue_id | locale | setting_name | setting_value | setting_type |
±---------±-------±----------------------±--------------------±-------------+
| 164 | en_US | title | | string |
| 164 | en_US | coverPageDescription | | string |
| 164 | en_US | showCoverPage | 0 | int |
| 164 | en_US | hideCoverPageArchives | 0 | int |
| 164 | en_US | hideCoverPageCover | 0 | int |
| 164 | en_US | description | | string |
| 183 | en_US | title | | string |
| 183 | en_US | coverPageDescription | | string |
| 183 | en_US | coverImageAltText | | string |
| 183 | en_US | showCoverPage | 0 | int |
| 183 | en_US | hideCoverPageArchives | 0 | int |
| 183 | en_US | hideCoverPageCover | 0 | int |
| 183 | en_US | description | | string |
| 185 | en_US | title | | string |
| 185 | en_US | coverPageDescription | | string |
| 185 | en_US | coverImageAltText | | string |
| 185 | en_US | showCoverPage | 0 | int |
| 185 | en_US | hideCoverPageArchives | 0 | int |
| 185 | en_US | hideCoverPageCover | 0 | int |
| 185 | en_US | description | | string |
| 186 | en_US | title | | string |
| 186 | en_US | coverPageDescription | | string |
| 186 | en_US | coverImageAltText | | string |
| 186 | en_US | showCoverPage | 0 | int |
| 186 | en_US | hideCoverPageArchives | 0 | int |
| 186 | en_US | hideCoverPageCover | 0 | int |
| 186 | en_US | description | | string |
| 187 | en_US | title | | string |
| 187 | en_US | coverPageDescription | | string |
| 187 | en_US | coverImageAltText | | string |
| 187 | en_US | showCoverPage | 0 | int |
| 187 | en_US | hideCoverPageArchives | 0 | int |
| 187 | en_US | hideCoverPageCover | 0 | int |
| 187 | en_US | description | | string |
| 422 | en_US | title | Vol 29, No 1 (2018) | string |
| 422 | en_US | description | | string |
| 432 | en_US | title | | string |
| 432 | en_US | description | | string |
±---------±-------±----------------------±--------------------±-------------+
38 rows in set (0.00 sec)

Where this checkbox is?

The checkbox is in the form you use to edit an issue
Issues > Back issues > blue triangle > Edit > Issue data, under the title field

You could try editing an issue and choosing only Volume Number Year for the issue identification.

You still have to have the lt_LT locale in some field somewhere, otherwise you would not of course see that error.

Thank you. I thought there is a checkbox to change it for all issues at once, it seems there is not, so I did this (in mysql client):
update issues set show_volume = 1;
update issues set show_number = 1;
update issues set show_year = 1;
update issues set show_title = 0;

1 Like

As for PHP Warning: Illegal string offset ‘en_US’ in /var/www/html/ojs33/lib/pkp
/classes/core/DataObject.inc.php on line 133, it was because of my old experiments - I had 2 mailingAddress rows with locale defined, when I tried to make mailingAddress multilingual. After I deleted those 2 records, I have no more warnings.

1 Like