Production stage Loading endlessly in 3.2.1.2

I just upgraded to OJS 3.2.1.2. In the workflow, I have been stuck at the production stage with the former section for production galley loading endlessly. I wouldn’t know what is wrong.

Production_stage

I also switched to the production tab, under the Galley section, The ADD NEW GALLEY section didn’t load beyond the first page where I specify Galley label.

In the console i have the following error code for all the failed functions

jquery.min.js?v=3.2.1.2:2 GET https://journalAlias.com/index.php/journal/$$$call$$$/grid/article-galleys/article-galley-grid/fetch-grid?submissionId=291&_=1619103203363 404 (Not Found)

https://journalAlias.com/index.php/journal/$$$call$$$/grid/article-galleys/article-galley-grid/update-galley?submissionId=291&representationId=

Here is the output of error log file between the time frame I was testing out the site.

[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:21 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:21 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:21 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:21 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:22 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:22 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:22 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:16:22 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:16:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:16:22 UTC] ojs2: 404 Not Found
[22-Apr-2021 14:18:10 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:18:10 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:18:10 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:18:12 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:18:12 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:18:12 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:18:13 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:18:13 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:18:13 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[22-Apr-2021 14:18:19 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[22-Apr-2021 14:18:19 UTC] PHP Warning:  file_put_contents(/home/journalAlias/public_html/cache/fc-pluginSettings-1-bootstrapthreethemeplugin.php): failed to open stream: Permission denied in /home/journalAlias/public_html/lib/pkp/classes/cache/FileCache.inc.php on line 90
[22-Apr-2021 14:18:19 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74

Kindly review asap. I am in a deadline situation as our publication cycle is being disrupted. Can you please HELP !

Hi @oyedeyeye,

Again, please be patient – we’re a small team and need to balance the support we offer amongst many other things.

I think there are at least two problems:

  • The file controllers/grid/articleGalleys/ArticleGalleyGridHandler.inc.php appears to be missing from your installation
  • There is a file permission problem in the cache directory preventing OJS from managing files there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Thank you for your kind response. I appreciate the great works you are doing.

However, the problem still persists.

  • The file controllers/grid/articleGalleys/ArticleGalleyGridHandler.inc.php was not missing from the installation.

  • The file permission error has been solved.

Two issues still persist from the output of the error_log file.

[03-May-2021 09:53:52 UTC] ojs2: 404 Not Found
[03-May-2021 09:55:16 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[03-May-2021 09:55:16 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[03-May-2021 09:55:16 UTC] ojs2: 404 Not Found
[03-May-2021 09:56:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[03-May-2021 09:56:21 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74
[03-May-2021 09:56:26 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 52
[03-May-2021 09:56:26 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/JournalAlias/public_html/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 74

My sentiment

  1. I am of the opinion that the issue might relate to the compatibility of OJS 3.2.1.X with BOOTSTRAP3 Theme plugin in OJS. The site was upgraded from OJS 3.1.1.2-4.

  2. Inspecting my browser console, I found out that the GET method for the Production stage and POST method for Galley under Publication were throwing HTTP 404 Error. Could this be a problem with the database?

We will appreciate your timely response.

I could not access the server for a long time, my login access to the private server we run the OJS on had issues. In fact, we are months behind our publication schedule.

Thanks and regards.

Hi @oyedeyeye,

I am of the opinion that the issue might relate to the compatibility of OJS 3.2.1.X with BOOTSTRAP3 Theme plugin in OJS. The site was upgraded from OJS 3.1.1.2-4.

You can eliminate the Bootstrap3 plugin as the cause of the problem by temporarily changing the journal theme to Default and testing to see if the problem remains.

Inspecting my browser console, I found out that the GET method for the Production stage and POST method for Galley under Publication were throwing HTTP 404 Error. Could this be a problem with the database?

Yes, that’s possible; the fetch-grid operation you quoted as a 404 response above would be a good one to debug. The URL you quoted for that was:

https://journalAlias.com/index.php/journal/$$$call$$$/grid/article-galleys/article-galley-grid/fetch-grid?submissionId=291&_=1619103203363

The request makes use of several authorization policies that can potentially result in a 404 response, in particular:

  • lib/pkp/classes/security/authorization/internal/SubmissionRequiredPolicy.inc.php
  • lib/pkp/classes/security/authorization/internal/PublicationRequiredPolicy.inc.php

In these classes, you can see:

$callOnDeny = array($request->getDispatcher(), 'handle404', array());

This causes the Dispatcher::handle404 function to be called when there is a denial of this policy. Further down in the same class you’ll see cases where AUTHORIZATION_DENY is returned; you might start debugging this by confirming whether AUTHORIZATION_DENY is being returned from this policy by adding error_log lines to note the condition in the PHP error log.

This might indicate that the submission exists in the database in the submissions table but doesn’t have a valid entry in publications. (Did you encounter upgrade issues related to this?)

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher

I tried changing to the Default Theme but the problem was unresolved.

Also tried your suggestion out

Here is the content of my error_log file

[08-May-2021 08:42:00 UTC] ojs2: 404 Not Found
[08-May-2021 08:42:48 UTC] ojs2: 404 Not Found
[08-May-2021 08:44:24 UTC] PHP Warning:  Declaration of ManageSubmissionFilesForm::execute($stageSubmissionFiles, $fileStage = NULL) should be compatible with Form::execute(...$functionArgs) in /home/journalAlias/public_html/lib/pkp/controllers/grid/files/form/ManageSubmissionFilesForm.inc.php on line 19
[08-May-2021 08:44:42 UTC] PHP Warning:  Declaration of ManageSubmissionFilesForm::execute($stageSubmissionFiles, $fileStage = NULL) should be compatible with Form::execute(...$functionArgs) in /home/journalAlias/public_html/lib/pkp/controllers/grid/files/form/ManageSubmissionFilesForm.inc.php on line 19
[08-May-2021 08:45:16 UTC] ojs2: 404 Not Found
[08-May-2021 08:45:33 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getCount() on array in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php:223
Stack trace:
#0 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_60956fe4187d78_44344495(Object(Smarty_Internal_Template))
#1 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#4 /home/journalAlias/public_html/cache/t_compile/42362804174f266c5 in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php on line 223
[08-May-2021 08:46:04 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getCount() on array in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php:223
Stack trace:
#0 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_60956fe4187d78_44344495(Object(Smarty_Internal_Template))
#1 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#4 /home/journalAlias/public_html/cache/t_compile/42362804174f266c5 in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php on line 223
[08-May-2021 08:47:53 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getCount() on array in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php:223
Stack trace:
#0 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_60956fe4187d78_44344495(Object(Smarty_Internal_Template))
#1 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/journalAlias/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#4 /home/journalAlias/public_html/cache/t_compile/42362804174f266c5 in /home/journalAlias/public_html/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^addd65021fadf964339ab08cd1aa93ba59b14e9c_0.app.frontendobjectsarticledet.php on line 223
[08-May-2021 08:49:01 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/journalAlias/public_html/plugins/themes/classic/ClassicThemePlugin.inc.php on line 94
[08-May-2021 08:50:23 UTC] ojs2: 404 Not Found

Kindly help me to checkout the location where I inserted the error_log

// Validate the submission id.
$submissionDao = DAORegistry::getDAO('SubmissionDAO'); /* @var $submissionDao SubmissionDAO */
$submission = $submissionDao->getById($submissionId);
if (!is_a($submission, 'Submission')) return AUTHORIZATION_DENY;
		
// Validate that this submission belongs to the current context.
$context = $this->_request->getContext();
if ($context->getId() != $submission->getData('contextId')) return AUTHORIZATION_DENY;
'error_log';

Hi @oyedeyeye,

The error messages you quote in the log aren’t related to the authorization issue you’re trying to debug – but I see reference to getCount() calls there, which shouldn’t be present in that file – have you modified template code or mixed code from different versions of OJS together?

It looks like you just insterted the line 'error_log'; into the code, which won’t do anything. To get a line recorded in the PHP error log you would need to add something like…

error_log('here is my log line');

However, we’re starting to get into programming, and I can only give you limited guidance on how to start with PHP – there are lots of good online resources. I can help where it relates specifically to OJS.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you for your response @asmecher

I have a fairly good understanding of JavaScript, the dev team on whose server our Journal is hosted are core PHP programmers.

They got tired of the whole issues and charged me to find solutions while they run the solution on the server.

for minor code changes, I can get in and try it out if it will not break things.

I tried this out

And I got the exact error text inserted. Here’s the output

[10-May-2021 19:28:11 UTC] ojs2: 404 Not Found
[10-May-2021 19:28:11 UTC] ojs2: 404 Not Found
[10-May-2021 19:54:15 UTC] Cannot get Submission Id
[10-May-2021 19:54:15 UTC] Cannot Validate the submission id
[10-May-2021  19:54:15 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:16UTC] Cannot get Submission Id
[10-May-2021 19:54:16 UTC] Cannot Validate the submission id
[10-May-2021 19:54:16 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:18 UTC] Cannot get Submission Id
[10-May-2021 19:54:18 UTC] Cannot Validate the submission id
[10-May-2021 19:54:18 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:19 UTC] Cannot get Submission Id
[10-May-2021 19:54:19 UTC] Cannot Validate the submission id
[10-May-2021 19:54:19 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:19 UTC] Cannot get Submission Id
[10-May-2021 19:54:19 UTC] Cannot Validate the submission id
[10-May-2021 19:54:19 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:19 UTC] Cannot get Submission Id
[10-May-2021 19:54:19 UTC] Cannot Validate the submission id
[10-May-2021 19:54:19 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:20 UTC] Cannot get Submission Id
[10-May-2021 19:54:20 UTC] Cannot Validate the submission id
[10-May-2021 19:54:20 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:21 UTC] Cannot get Submission Id
[10-May-2021 19:54:21 UTC] Cannot get Submission Id
[10-May-2021 19:54:21 UTC] Cannot get Submission Id
[10-May-2021 19:54:21 UTC] Cannot Validate the submission id
[10-May-2021 19:54:21 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:21 UTC] Cannot Validate the submission id
[10-May-2021 19:54:21 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:21 UTC] Cannot get Submission Id
[10-May-2021 19:54:21 UTC] Cannot Validate the submission id
[10-May-2021 19:54:21 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 19:54:21 UTC] ojs2: 404 Not Found

It seems AUTHORIZATION_DENY is fired from the Submission Id Validation block.
What do you suggest that we look into?

On this

We started using OJS 2.XX before we upgraded to OJS 3.0.x. This should be the 4th upgrade that we are doing on our server. I see that line often on error_log saying OJS 2 Not Found.

I look forward to you reply as we are already being pressured and considering a total rollback to the previous version if we can fix this as our publication is already 2 months behind schedule.

Regards

@asmecher

I went through testing of the Journal Workflow again.

Just at the Copyediting stage I went back to check my error_log and I have this:

[10-May-2021 20:22:32 UTC] Cannot get Submission Id
[10-May-2021 20:22:32 UTC] Cannot Validate the submission id
[10-May-2021 20:22:32 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:38 UTC] Cannot get Submission Id
[10-May-2021 20:22:38 UTC] Cannot Validate the submission id
[10-May-2021 20:22:38 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:38 UTC] PHP Warning:  Declaration of ManageSubmissionFilesForm::execute($stageSubmissionFiles, $fileStage = NULL) should be compatible with Form::execute(...$functionArgs) in /home/futajeet/public_html/lib/pkp/controllers/grid/files/form/ManageSubmissionFilesForm.inc.php on line 19
[10-May-2021 20:22:40 UTC] Cannot get Submission Id
[10-May-2021 20:22:40 UTC] Cannot Validate the submission id
[10-May-2021 20:22:40 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:40 UTC] PHP Warning:  Declaration of ManageSubmissionFilesForm::execute($stageSubmissionFiles, $fileStage = NULL) should be compatible with Form::execute(...$functionArgs) in /home/futajeet/public_html/lib/pkp/controllers/grid/files/form/ManageSubmissionFilesForm.inc.php on line 19
[10-May-2021 20:22:40 UTC] Cannot get Submission Id
[10-May-2021 20:22:40 UTC] Cannot Validate the submission id
[10-May-2021 20:22:40 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:50 UTC] Cannot get Submission Id
[10-May-2021 20:22:50 UTC] Cannot Validate the submission id
[10-May-2021 20:22:50 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:50 UTC] Cannot get Submission Id
[10-May-2021 20:22:50 UTC] Cannot Validate the submission id
[10-May-2021 20:22:50 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:53 UTC] Cannot get Submission Id
[10-May-2021 20:22:53 UTC] Cannot Validate the submission id
[10-May-2021 20:22:53 UTC] Cannot Validate that this submission belongs to the current context.
[10-May-2021 20:22:53 UTC] PHP Warning:  Declaration of ManageSubmissionFilesForm::execute($stageSubmissionFiles, $fileStage = NULL) should be compatible with Form::execute(...$functionArgs) in /home/futajeet/public_html/lib/pkp/controllers/grid/files/form/ManageSubmissionFilesForm.inc.php on line 19
[10-May-2021 20:22:54 UTC] Cannot get Submission Id
[10-May-2021 20:22:54 UTC] Cannot Validate the submission id
[10-May-2021 20:22:54 UTC] Cannot Validate that this submission belongs to the current context.

I feel this captured the issue better.
Thank as I wait for your response.

Hi @oyedeyeye,

Can you clarify what your code looks like after adding the error_log calls? I’d like to make sure I can interpret the logs accurately.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher

Thank you for your response.

My error_log output is posted

I look forward to your response

Hi @oyedeyeye,

I’m wondering about your .php code, where you inserted the error_log calls, not the error log itself (which you’ve already posted).

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher

Here is my .php code. I placed the code in lib/pkp/classes/security/authorization/internal/SubmissionRequiredPolicy.inc.php

function dataObjectEffect() {
		// Get the submission id.
		$submissionId = $this->getDataObjectId();
		if ($submissionId === false) return AUTHORIZATION_DENY;
		error_log('Cannot get Submission Id');

		// Validate the submission id.
		$submissionDao = DAORegistry::getDAO('SubmissionDAO'); /* @var $submissionDao SubmissionDAO */
		$submission = $submissionDao->getById($submissionId);
		if (!is_a($submission, 'Submission')) return AUTHORIZATION_DENY;
		error_log('Cannot Validate the submission id');
		
		// Validate that this submission belongs to the current context.
		$context = $this->_request->getContext();
		if ($context->getId() != $submission->getData('contextId')) return AUTHORIZATION_DENY;
		error_log('Cannot Validate that this submission belongs to the current context.');

		// Save the submission to the authorization context.
		$this->addAuthorizedContextObject(ASSOC_TYPE_SUBMISSION, $submission);
		return AUTHORIZATION_PERMIT;
	}

Hi @oyedeyeye,

I think you’ve misread the code – it’s the cases where AUTHORIZATION_DENY is returned that represent failures, but your error_log calls are executing in the opposite case.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher

How do you suggest I fix this?

Hi @oyedeyeye,

Instead of…

if ($submissionId === false) return AUTHORIZATION_DENY;
error_log('Cannot get Submission Id');

…I think you probably intended…

if ($submissionId === false) {
    error_log('Cannot get Submission Id');
    return AUTHORIZATION_DENY;
}

…and similar corrections for the other error_log calls. But I’d recommend checking out some general resources on PHP; I can only give limited help outside of OJS/OMP/OPS.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher

Thank you for your support. We couldn’t make headway so reverted back to OJS 3.1.1.4

A fantastic idea came up that if we can actually move back, we can as well try to move further ahead.

Therefore we upgraded to the lastest stable release OJS 3.3.0.6.

After fixing every bit and pieces necessary, we started getting Slim Error on uploads to the site at any stage of the workflow

We found out that your suggestions on Error in submission - #2 by Angie_Jimenez about the absence of fileInfo worked fine.

Our journal site is up and running now.

Thanks and regards.

1 Like