I’m getting those notifications when I log in OJS. I’m the journal administrator and manager in 18 journals, as such I don’t know which journal is giving me that, or if all of them is making those pop.
Is there anyway to check the notifications that were generated so I can track the cause of that?
When I upgraded to OJS 3.x I had a lot of problems with missing notifications and I had to manually create an entry in the table. I think this problem is related to that. How can I verify that I have all the entries needed in the notification table?
The best clue is probably in the type column. This corresponds to a constant that should be unique for each type of notification. Here is a quick list of all of those I found in OJS 3.3.0:
Hi @luizborges@NateWr, how are you? I am experimenting the same problem. I checked the “notifications table” and I found the following type of notification: 369098754 (it doesn´t appear on the list). Do you know where can I find the information about this type?
Thank you!
Hi @luizborges, bringing our conversation from GitHub back to the forum. There you asked:
Where are those notifications being generated? Can I log what info/db entry they use to generate those? Maybe this way I can track this down. What DB tables are related to this that I can investigate?
I’d recommend starting with PKPLocale::translate(). This is where every locale key (any.locale.key) is converted into a message.
If you add some logging there it’s going to be noisy, because it gets hit with every translated string. But you might be able to detect what is happening by inspecting the key that’s passed, or looking for empty strings returned by the function. If you throw an exception in there when you get an empty string result, you should get some clues about the code that’s calling it.
Looking over our previous conversation: old notification type codes could definitely be the problem here. The backtrace from an exception in PKPLocale::translate() will hopefully help track those down. But it may take some investigative work going back to OJS 2.x to figure out what types the old codes referred to, and whether they need to be migrated to new types.
How would I go about throwing an error that isn’t fatal (meaning it doesn’t show up for the user) but is still logged in httpd-error.log?
One of those codes still happens today as I mentioned on github. I tried to search for it both in decimal and in hex, but couldn’t find it on the source code: 369098754. I strongly suspect this is the culprit.
I checked for that myself but it doesn’t look like it’s in 3.3. Maybe it’s related to a plugin? I don’t have OJS 2.x to look back at, but I’ll see if one of my colleagues can find the three constants mentioned in this post.
The idea that this could be related to a plugin is an interesting one. I made a list of all plugins enabled in one journal or another in my installation:
Block Plugins
Browse Block
“Developed By” Block
Information Block
Keyword Cloud Block
Language Toogle Block
Gateway Plugins
Resolver Plugin
Generic Plugins
Announcement Feed Plugin
Authors History
Citation Style Plugin
Custom Block Manager
Default Translation Plugin
DRIVER
Dublin Core Indexing Plugin
Google Analytics Plugin
Google Scholar Indexing Plugin
eLife Lens Article Viewer
ORCID Profile Plugin
OpenAIRE
PDF.JS PDF Viewer
Matomo Plugin
PKP PN Plugin
Recommend Articles by Author
Recommend Similar Articles
Static Pages Plugin
Text Editor Extras
Web Feed Plugin
Public Identifier Plugins
DOI
Theme Plugins
Default Theme
Not sure if any of those could be responsable.
I added a throw at the end of the code before it return the possible null/empty $value at the end, like you suggested, lets hope it sheds some light in the matter.
Shallow sampling for 268435478, or 0x10000016, disappears for us around the time of upgrades from 2.3.8 to 2.4.5, so this value may be from the 2.3 era.
I think @ctgraham cracked the case. Indeed this seems could be the case…
I think the one I’m still getting (0x16000002) is probably
PLN_PLUGIN_NOTIFICATION_TYPE_ISSN_MISSING
But is there a way to know which journal is missing the ISSN, and why I get this notification so sporadically (I think it is around once or twice a week, but sometimes much longer without a notification or many more in a shorter interval)?
PS: Great detective work deconstructing this hex crime as you said.