Upgrade OJS 3.0.2 to 3.1.0-1 locale missing

I upgraded 3.0.2 to 3.1.0-1 without difficulties during the upgrade process. Hower, I noticed that locale is missing
I have had OJS with English and Serbian language. Due to changes of locale name
since Serbian does have two scripts i.e. cyrillic and latin that locale is missing and I have to install it and fix many missing things. Mybe there should be some mechanism which will associate locale to proper names so such issue will be managed properly during upgrade process.
This could be helpful for other languages which have two names or scripts.

1 Like

Hi @vvucic,

I see that this is also posted in another thread. Please don’t double-post – it clutters the forum.

Alec Smecher
Public Knowledge Project Team

Yes, but this one is m ore intended as general remark to introduce mechanism which can help during upgrade process. In Questions part of forum I asked for assistance. Sorry, if I was not clear/distinct enough.
For example, when someone installs OJS there is option to choose locale. When someone wants to upgrade there is no option to manage locale. In case of changes of locale like in Serbian and possibly in other languages there can be an issue that will require manual intervention or very skilled person. That is the point, suggestion to introduce mechanism that will help someone to manage locale like during install process.

Hi @vvucic,

Thanks for the clarity – I think @bozana is working on this.

Alec Smecher
Public Knowledge Project Team

Great! I am willing to establish testing environment in order to test and help @bozana.

Here is the GitHub Issue: sr_SR migration to either sr_RS@latin or sr_RS@cyrillic · Issue #3416 · pkp/pkp-lib · GitHub

@vvucic, thanks a lot! I will come back to you, at least to ask you to test the fix…


Hi @vvucic

I made a PR: pkp/pkp-lib#3416 migrate sr_SR to sr_RS@latin by bozana · Pull Request #1857 · pkp/ojs · GitHub.
Additionally also this change is needed: fix locale column size to fit new locales · pkp/staticPages@f45b4bf · GitHub.

Per default the sr_RS@latin is used, but if someone would like to have sr_RS@cyrillic, he/she can change just this code line: ojs/Upgrade.inc.php at 36e1ce20ff5b3db4e8e7e358f66b1f9aa36680d6 · bozana/ojs · GitHub

Would it be possible for you to test the upgrade?

Thanks a lot!!!


I will test it tomorrow and let you know how it went.


I noticed differences in my OJS 3.10-1 files and yours. DO you use some version with additions after official release?
I used official version of OJS 3.1.0-1, and added files files from ojs-master on github and edited accordingly
When I start install I got message
DB Error: Table ‘eapiea66_ojs720.plugin_settings’ doesn’t exist

The database was imported correctly. Should I try to import database again or that is some other issue?

Hello @bozana
After fixing import of database I started upgrade procedure and when I clicked on Upgrade Open Journal Systems
It started throw this message: all_user_func() expects parameter 1 to be a valid callback, class 'Upgrade' does not have a method 'checkPhpVersion' in C:\xampp\htdocs\eap-iea\lib\pkp\classes\install\Installer.inc.php on line 415
and returned me back on Upgrade page.
Please advise.

Hi @vvucic

Ah, correct, I only did the changes for the master branch :frowning:

I will port the changes to the ojs-stable-3_1_0, so that you can use the patch with the OJS 3.1.0-1 release.

If you would like and if it is possible for you, you could also send me (bozana dot bokan at posteo dot net) your anonymized DB dump and I can also double check it…

Thanks a lot!

Here are the changes/fix for ojs-stable-3_1_0: pkp/pkp-lib#3416 migrate sr_SR to sr_RS@latin by bozana · Pull Request #1862 · pkp/ojs · GitHub
I will not merge it, but for those who need it…
Else, the changes will be in the next OJS release coming soon…

OK. Thanks. I used all files from OJS 3.1.0-1 official version and just two files from github ojs-master. I used two files in which there were additions you committed for managing issue of upgrade with choice of locales.

Did you use the whole files or just inserted the changes? If you used the whole files it could lead to an error (except plugins/generic/externalFeed/schema.xml and plugins/generic/staticPages/schema.xml) because those could contain code not suitable for ojs-stable-3_1_0…

I used whole files since I was confused with different line numbers. But, I used only two files from github. I did not used except plugins/generic/externalFeed/schema.xml since we do not need that plugin now. Is it necessary to use it?

I used from github ojs-master branch
The rest is from official release of OJS 3.1.0-1
Do I have to correct something and try upgrade again?

I am confused with error that appeared as I mentioned above.

When I use official release of OJS 3.1.0-1 and add to those files what is needed according to links you provided I got this error message at the beginning of upgrade process:
Fatal error: Cannot redeclare Upgrade::migrateSRLocale() in C:\xampp\htdocs\eap-iea\classes\install\Upgrade.inc.php on line 2743
Should I use whole files from ojs-master branch or just add your code in files that are part of official relase of OJS 3.10-1?

Please advise.

Hi @vvucic

Hmmm… Do you maybe have that function two or more times? Somehow… :thinking: