OJS3 causes many errors in notificationManager line 188

Hi,

edit: for some reason the forum does not allow EditingProductionStatusNotificationManager in the title :smiley:

Our site has a lot of these errors:
[Wed May 10 11:21:05 2017] [error] [client 193.xxx] PHP Warning: assert(): Assertion failed in /var/www/www.site.fi/public_html/lib/pkp/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php on line 188, referer: https://site.fi/journal/workflow/index/63165/1

I see that it is the default for a switch here: https://github.com/pkp/pkp-lib/blob/master/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php#L188 but what is the situation where it is triggered?

OJS 3.0.2

This would indicate that the submission is neither in the stage WORKFLOW_STAGE_ID_PRODUCTION nor WORKFLOW_STAGE_ID_EDITING. To get more details in your error log, turn on show_stacktrace in config.inc.php. This will allow you to trace the PHP calls which triggered the error.

Based on the referring URL, it looks like your entry point is here:

with a parameter of submission ID 63165.

ok thanks, I will try to debug it with show_stacktrace. The problem is that there are a lot of other errors as well so it could get noisy.

Hi,

edit: Ok, I take the earlier message back.

The error is caused in a situation where the article is in the submission stage and an editor adds a new pre-review discussion.

In that situation, this is called https://github.com/pkp/pkp-lib/blob/master/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php#L77

But there is no switch case here for the submission stage: https://github.com/pkp/pkp-lib/blob/master/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php#L106

Why is that, @bozana? (sorry for always bugging you, but I know that you are on almost the same timezone :D)

Hi @ajnyga

Thanks a lot for investigating it… I will take a look…
And no problem, I like to be bugged :-DDD

ok thanks, note that it could be that these are somehow related to the upgrade. I am not sure.

Hi @ajnyga, here is the patch: do not update copyedit and production notifications in a pre-review discussion · Issue #2519 · pkp/pkp-lib · GitHub
THANKS!!!
Bozana

Hi @bozana

Also getting the same error from the review stage:
[Mon May 15 11:14:38 2017] [error] [client 93.xxx] PHP Warning: assert(): Assertion failed in /lib/pkp/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php on line 188, referer: https://site.fi/journal/workflow/index/59665/3

Thanks a lot @ajnyga, I will take a look…

@ajnyga, when does this message occurs? At what action?

hard to say, I am just picking these up from the error log. Just a minute

ok, so it could actually be /$$$call$$$/grid/users/stage-participant/stage-participant-grid/delete-participant

I have a new error in the submission stage as well even after applying your earlier fix:
[Mon May 15 13:45:35 2017] [error] [client 93.xxx] PHP Warning: assert(): Assertion failed in /lib/pkp/classes/notification/managerDelegate/EditingProductionStatusNotificationManager.inc.php on line 188, referer: https://site.fi/journal/workflow/index/63132/1

OK, I think I will have to check all places where this notifications is called… Thanks a lot!!!

@bozana, I think I got it, scenario:

  • add a new stage participant, for example author
  • start a new discussion with that that participant
  • remove the participant from the list => the above errors occur

Thanks a lot @ajnyga! I also realized that there are a few more places: for example one could upload a copyedited files also if submission is not in the copyedit stage, which would lead to the message as well. Also, when deleting a discussion. So I will double check all those update notifications – there are not sooooooooo many of them… :slight_smile:

1 Like

@ajnyga, here are the PRs:
pkp-lib master: pkp/pkp-lib#2519 fix notifications in a pre-review discussion by bozana · Pull Request #2520 · pkp/pkp-lib · GitHub
ojs master: pkp/pkp-lib#2519 fix editing and production status notifications update calls by bozana · Pull Request #1384 · pkp/ojs · GitHub
I tested some of them and will test the rest… tell me if it is ok so for you now…
Thanks!

1 Like

wow, so there were a few more as well :smiley:

I will do a patch to our site and see what happens.