Error in QueriesAccessHelper.inc.php on OJS 3.3.0-20 with PHP7

Hi,

We’re using OJS 3.3.0-20 with PHP7 in a testing environment, and we’re encountering the following log messages when a user accesses the author dashboard to view a specific submission in the revision tab, after the reviser has returned the reviewed article:

PHP Notice:  Undefined offset: 3 in .../lib/pkp/controllers/grid/queries/QueriesAccessHelper.inc.php on line 159
PHP Warning: array_intersect(): Expected parameter 1 to be an array, null given in .../lib/pkp/controllers/grid/queries/QueriesAccessHelper.inc.php on line 159

The errors repeat several times during the same request.

Context:

  • OJS version: 3.3.0-20
  • PHP version: 7.x
  • Error appears when accessing the author dashboard of a specific submission
  • No customizations have been made to this file
  • It seems the system is trying to access a non-existent index in an array

Here is a screenshot of what the user sees:

The author experiences an endless loop where the reviewed files should be, thus preventing the editorial workflow to continue.

Has anyone experienced a similar issue? Could it be related to roles or permissions in the internal query system?

Thanks in advance!

Hi @EcologiaPolitica,

This looks to me like a harmless warning message – I’ve resolve it with this commit, which you can apply in lib/pkp – but if you have errors/warnings configured to be sent to the browser in your PHP configuration, it’s possible that the warnings are interfering with AJAX requests, causing the apparent endless loop. I would suggest…

  • Apply the commit to see if it fixes the problem, and if so,
  • Make sure to configure your PHP so that errors/warnings are logged, not sent to the browser. (This is recommended for production deployments for security reasons.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, thanks for the reply.

Unfortunately, we did everything you suggested without any luck, as the problem remains. Additionally, the server is already configured in a way that shouldn’t be displaying any errors (but somehow they are still displayed).

Also, the server errors that I pasted in the previous post are now gone, but the user sees the same as before.

Do you know anything else we can try?

Thanks

Hi @EcologiaPolitica,

When you see an endless spinner, it’s almost always going to show as an entry in the error log – either server-side, in the PHP error log, or in the browser’s web developer error console. Can you double-check both places to see what’s there?

Thanks,
Alec Smecher
Public Knowledge Project Team

I have this in the web developer console:


There is nothing on the server log…

Also, when I access to the page as the author, I have this message:

Finally, I’ve found that I can solve this error and gain access to the revised docs as author if I give the user the reviser role, besides the author.