[OJS 3.1.1.2] OJS list of participants forever loading

Hi all,

I am using OJS 3.1.1.2. and have a problem with only one submission, all others are working OK. The problem is that when viewing one (not yet published) submission the list of participants on the right sidebar doesn’t load, only spinning:

image

The error in the console is following:

VM1477:1 GET https://…/index.php/ZdravVest/$$$call$$$/grid/users/stage-participant/stage-participant-grid/fetch-grid?submissionId=2972&stageId=4&_=1588447886862 500 (Internal Server Error)

Unfortunately I can’t find anything useful in the server/access logs. Note that this happens for this particular submission only.

Any idea how to proceed with the investigation?

Regards, Primož

Hi @primozs,

There will definitely be something logged in the web server error log when you see a 500 code. What do you see there?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Unfortunately I cannot find anything in the logs. The interesting is that everzthing else works. So all other submissions, etc. Also within this submission I can check metadata, history, reviews,… Just the list of contributors is spinnign forever.
This make sme thinking something is wrong with this concrete submisssion. I have enables the ‘WEB debugging’ - the lines in the config.inc.php. I don’t see anything there. Do you mind if I send the output privately to you if you get any idea how to proceed?

Best regards, Primož

Hi @primozs,

There will definitely be something logged in the server side logs; if you don’t see anything in your PHP error log then it’s possible that you might find something in your Apache error log. I’m not sure which “web debugging” setting you’re referring to, though?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

What I wanted to say with the ‘web debugging’ is that I switched on the settings:

  • debug (for DB)
  • show_stacktrace
  • display_errors
  • log_web_service_info

so I got some things to look at. However in this case only the left hand menu is displayed, the rest not, except the ‘debug lines’.

Best regards, Primož

Hi @primozs,

I’d suggest disabling debug and display_errors; they’ll interfere with OJS. The log_web_service_info setting isn’t relevant to what you’re encountering and I’d suggest leaving it Off. Likewise, leave the show_stacktrace option Off; we’ll need to find/identify the error message before this will be helpful.

Try those settings, then review your logs carefully to see if anything shows up when you hit the problem page.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you for being so patient. Finally I got the error in the php.log that shows something:

[12-May-2020 16:35:08 UTC] PHP Fatal error: Call to a member function getFullName() on null in …/lib/pkp/controllers/grid/users/stageParticipant/StageParticipantGridCellProvider.inc.php on line 36

Any idea how to proceed?

Best regards, Primož

PS: I have looked in the DB and found perfectly OK entry in the authors table for this submission and author.

Hi @primozs,

That’s a data error; look for entries in your stage assignments that reference non-existent users:

SELECT sa.* FROM stage_assignments sa LEFT JOIN users u ON (sa.user_id = u.user_id) WHERE u.user_id IS NULL;

These rows should probably be deleted. (Make sure to take a good backup first!)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I found the problem at the same time also by myself: There was an error in the stage_assignments table, where the submission author was wrong, the user_is was pointing to not existing user. I investigated a bit more and (I believe) I found correct user, changed the wrong user_id and now it looks OK.

But, the point is how that happened. I am not sure, but I strongly believe that I merged two users and the author/stage_assignments was not updated properly. So I would suggest to look at the code and verify if there is something in that area.

Best regards, Primož

Hi @primozs,

It’s likely that you encountered one of several past bugs over the years related to the “Merge Users” feature. It’s possible that some database entities got left behind. There are several solutions to the general problem of data quirks that accumulate over the years, and we’ll probably pursue both:

  • A database checker that corrects/warns of problems
  • More use of JOIN in place of LEFT JOIN in SQL fetches, and
  • Conditionals in PHP code for cases where data can’t be fetched (added for this case)

Those are all longer-term projects, though.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you for help. I went over the list of bugs you shared and I think I found the one: Merge the user generates problems in the submission if he is a participant in the discussions · Issue #3811 · pkp/pkp-lib · GitHub

Best regards, Primož

1 Like