I’m in the process of updating several of our hosted OJS Journals to newer versions.
After Updating Journals to 22.214.171.124 and 126.96.36.199 I have encountered Errors when opening the Submissions page:
A popup containing “unexpected error” appears three times (similar behaviour as in other threads).
The Submissions page is not loading any content.
The rest of the page works as normal.
The following error shows up in the log:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function APP\Services\SubmissionService::getInSections(), 1 passed in /var/www/ojs_3203/plugins/generic/webFeed/WebFeedGatewayPlugin.inc.php on line 122 and exactly 2 expected in /var/www/ojs_3203/classes/services/SubmissionService.inc.php:151\nStack trace:\n#0 /var/www/ojs_3203/plugins/generic/webFeed/WebFeedGatewayPlugin.inc.php(122): APP\Services\SubmissionService->getInSections(‘32’)\n#1 /var/www/ojs_3203/pages/gateway/GatewayHandler.inc.php(230): WebFeedGatewayPlugin->fetch(Array, Object(Request))\n#2 /var/www/ojs_3203/lib/pkp/classes/core/PKPRouter.inc.php(391): GatewayHandler->plugin(Array, Object(Request))\n#3 /var/www/ojs_3203/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#4 /var/www/ojs_3203/lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request))\n#5 /var/www/ojs_3203/lib/pkp/clas in /var/www/ojs_3203/classes/services/SubmissionService.inc.php on line 151
Any idea what causes this and how it could be resolved?
thanks for the answer. Is there a quick way to check the plugins?
I did a fresh 3.2 installation. The only plugins I add are two which correspond to the looks of the page. After deactivating these two the journal is in stock configuration.
Also this error log is probably from a 3.2.0-1 installation. Was the error fixed in 3.2.0-3?
the WebFeedError is no longer there, it’s replaced by the one I mentioned.
The Error appears when opening the submissions page. The Popup opens three times, like mentioned above. The log coincides with the error on one journal, on the other no error log entry is made but the error appears to be the same on the front end.
The full error log entry is:
[Fri Jun 05 17:03:34.929330 2020] [php7:notice] [pid 3725] [client 188.8.131.52:55112] ojs2: 404 Not Found, referer: http://journalurl/submissions
[Fri Jun 05 17:03:34.972423 2020] [php7:notice] [pid 3724] [client 184.108.40.206:55108] ojs2: 404 Not Found, referer: http://journalurl/submissions
[Fri Jun 05 17:03:34.982762 2020] [php7:notice] [pid 3729] [client 220.127.116.11:55110] ojs2: 404 Not Found, referer: http://journalurl/submissions
I do have a .htaccess configured for both journals, that cuts out the “index.php/journalname” part of the URL:
Looks like a controller for a submissions page isn’t found. Yes, it’s likely because of URL rewrite. Did you check through the forum needed configurations in ojs config and apache requests redirecting/remapping? e.g.: How to remove index.php in ojs 18.104.22.168.
I seem to have found the problem, but I have no Idea on how to fix it.
the .htaccess is set to cut “index.php/journal/” from the URL. I do this, because I don’t want users to see the “/journal/” part in the URL and because I am upgrading older journals, that have a lot of DOI links to the URL without “/journal/” from older OJS 2 times.
If I cut “index.php” only from the URL, the submissions page works fine. Every other pages do too, but my DOI links are broken.
If I cut “index.php/journal/” from the URL, the submissions page doesn’t work. Every other page does.
Is there maybe something in the submissions page, that calls explicitely to the “journal” part in the URL?
As I wrote before, I’m not sure if PKPRouter::getContext will work if URL is missing the context part. Take a look at developer’s docs: Routes - Technical Documentation - OJS|OMP|OPS, context part points to the journal in OJS. Let’s assume that context is missing, how would Router determine the current context?
You can try to debug, not sure what debugging approach are you using, but the result can be simply written in the logs, e.g., error_log(print_r($yourVariableHere, true)).
Referred JS error just indicates that the element there should be in the DOM is missing.
Hi, we are seeing the same issue as well when opening the Submissions page (a popup error appears three times) with OJS 22.214.171.124. The page seems to load the content correctly after the errors are dismissed. The error does not appear with previous versions of OJS e.g. 3.1.2.x.
It appears that it’s to do with the URL rewrite that we have in place to remove “index.php/journal” so that it’s not visible to users.
Thank you very much for your contribution. I have tested your solution on my test domain, and can confirm that it works very well. I applied it to my live site and will update all DOI records now.