[SOLVED] OJS 3.1.1-0: Cannot see submissions and user roles

Hi all :slight_smile:

we upgraded OJS from 3.1.0-1 to 3.1.1-0 this week and came across an unexpected behaviour:

When clicking on the submissions of a journal, none of them are listed. The browser log (of different browsers) says, that $.pkp.app.accessRoles is undefined. A similar behaviour occurs when trying to edit a user: The user roles are missing. However the aforementioned message does not seem to appear in the browser log, but it sounds an awful lot like it might have to do with this problem as well.

In the apache log I didn’t see anything that seemed relevant; just some php warning concerning plugins. Here is some of the log, grepping for the referring URL and within the timespan of one access of the respective page:

Apache Log
[Fri Jun 01 11:50:04.756164 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.756636 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of PiwikPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/plugins/generic/piwik/PiwikPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.756658 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of PiwikPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/piwik/PiwikPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.756730 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of ShariffPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/plugins/generic/shariff/ShariffPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.761076 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.761100 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.761834 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /var/www/html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 19, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.762985 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /var/www/html/plugins/generic/driver/DRIVERDAO.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.763394 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of UserGridHandler::renderFilter($request) should be compatible with GridHandler::renderFilter($request, $filterData = Array) in /var/www/html/lib/pkp/controllers/grid/settings/user/UserGridHandler.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.763836 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of UserForm::display($args, $request) should be compatible with Form::display($request = NULL, $template = NULL) in /var/www/html/lib/pkp/controllers/grid/settings/user/form/UserForm.inc.php on line 18, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.763854 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of UserForm::initData($args, $request) should be compatible with Form::initData() in /var/www/html/lib/pkp/controllers/grid/settings/user/form/UserForm.inc.php on line 18, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.763868 2018] [:error] [pid 9296] [client 134.155.36.91:56400] PHP Warning:  Declaration of UserForm::execute($args, $request) should be compatible with Form::execute() in /var/www/html/lib/pkp/controllers/grid/settings/user/form/UserForm.inc.php on line 18, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.974702 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.974989 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of PiwikPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/plugins/generic/piwik/PiwikPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.975025 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of PiwikPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/piwik/PiwikPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.975067 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of ShariffPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/plugins/generic/shariff/ShariffPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.981575 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.981600 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.982296 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /var/www/html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 19, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access
[Fri Jun 01 11:50:04.983305 2018] [:error] [pid 11089] [client 134.155.36.91:56402] PHP Warning:  Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /var/www/html/plugins/generic/driver/DRIVERDAO.inc.php on line 0, referer: https://journals.bib.uni-mannheim.de/diskurse-digital/management/settings/access

System info:

Setting Name Setting Value
OS platform Linux
PHP version 7.0.27-0+deb9u1
Apache version Apache/2.4.25 (Debian)
Database driver mysqli
Database server version 10.1.26-MariaDB-0+deb9u1

We tried clearing the cache and running php /var/www/html/tools/upgrade.php upgrade again, but unfortunately that didn’t help. We also tried upgrading to 3.1.1-1 which didn’t resolve the issue either; so we fell beck to a snapshot of 3.1.1-0.

Any help, ideas and questions are much appreciated. Please let me know, if I can provide further information.

Best regards
Dennis

1 Like

Hi @dennmuel

Hmmm… How did you install 3.1.1-0? Using the release package or git?

Hmmm…
:-\ Bozana

Hi @bozana,

thanks for your quick response. :slight_smile:

We updated using git rebase --onto with the tag of the new version on the master branch. Since we had some messy git history (with our own modifications and pulling between release tags when we were playing around with OJS in the beginning of our project) we had to omit the tag of the old version and do some interactive rebase magic to clean things up a little bit. However, it went fairly well and I am not aware of any problems during the upgrade.

If by chance you would know where this aforementioned variable is being initialized or used (I couldn’t find it), I could check for modifications of that file, allthough I’m quite certain, that we didn’t touch anything going that far down into the nuts and bolts of OJS or lib/pkp. (That’s not to say, that we did and just don’t remember…)

Kind regards
Dennis

Hi @bozana ,

sorry for the double post, but my collegue seems to have found the solution.
We ran npm install and npm run build which affected the file js/build.js and fixed the problem.

These commands are documented on the github readme, but unfortunately not in the upgrade documentation. Are these commands mandatory to every installation / upgrade? If yes, perhaps it should be added to the upgrade doc. If not, I wonder how I could determine when they are and when they are not.

Best regards
Dennis

Hi @dennmuel,

The OJS 3.1.1-1 package includes pre-built javascript, so unless you’re modifying the site, you don’t need to rebuild the javascript. If you’re working from a Github checkout you’ll need to build it yourself.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

thanks for your quick reply. :slight_smile:

That’s good to know, thank you! As I see, my colleague already added the info to the upgrade documentation. Hope this helps someone else down the line. :slight_smile:

Kind regards and thanks for all the great work and support
Dennis

Hi @asmecher

I just upgraded an OJS 2.4.8.2 to OJS 3.1.1-2 and I believe I got the same problem as explained here. Users don’t see submission in dashboard (none: assigned, unassigned, all active, archive). Further on I noticed no roles have been assigned to users. The users I checked have no roles assigned.

I have upgraded using the package and not from github sources.

Do you think it is the same problem or something different?

Best regards, PrimoĹľ

Hi @primozs,

Are you absolutely sure that you received the “successful upgrade” confirmation message at the end of the process?

What version does OJS self-report in the Administrator’s area?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Well, I am not 100% sure, but 99%. As far as I recall I received it. The OJS self-reports correctly 3.1.1.2.

The rest looks OK. I have checked and there seems to be all entries in the user_user_group table, for example.

Best regards, PrimoĹľ

Hi @asmecher

I repeated the upgrade and came to the same results. This time I am sure about the successful upgrade:

Successfully upgraded to version 3.1.1.2

Maybe a remark that during the CLI upgrade process I receive several warnings, I believe not so important, but still, just in case:

PHP Warning: Cannot use a scalar value as an array in…

Any idea how to proceed? What to verify?

Best regards, PrimoĹľ

Hi @asmecher,

I have no idea why and how, but after few days everything works normal, without touching the environment at all. Just checked yesterday :slight_smile:

Best regard, Primoz