The issue:
“An unexpected error has occurred. Please reload the page and try again.” message appears when clicking save on Journal Settings > Masthead (for example changing journal title or editorial team, other settings like contacts, sections, and categories are not affected).
We are using OJS 3.3.0-20 now, we were using OJS 3.2.1-3 before and the error message was “An unexpected error occurred. You may have been logged out. Please reload the page and try again.”
The error log showed in OJS 3.2.1-3 was “[10-Feb-2025 23:24:09 Asia/Jakarta] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/…/domains/narrax.org/public_html/lib/pkp/classes/session/SessionManager.inc.php on line 71”.
But after upgrade, nothing in OJS 3.3.0-20 error log now.
This is probably caused by mod_security or another similar server-side tool interpreting a request erroneously as an attempt to break into the system. You may need to adjust your mod_security rules. Check the security log, and you may have to contact your site administrator for help.
Regards,
Alec Smecher
Public Knowledge Project Team
It seems that the error is caused by the “copy editor” word in the editorial team page. For some reason the “copy” word got blocked by OJS. Do you have any idea why this happen and how can I fix it? For temporary fix I will just remove the “copy” word.
This is nothing to do with OJS; the request gets blocked before it even gets to OJS by your server’s security tools. Unfortunately the rules they apply to incoming requests are often overzealous, as you’ve noticed. You’d need to contact your server admin for information on how to change those.
Regards,
Alec Smecher
Public Knowledge Project Team
I updated to OJS 3.4.0.8 and started having this problem in some save operations, but it only happens on some networks, for example at the University. I updated the PHP version to 8.4 and it improved, but in some cases, the error message appears or it says that I am not authorized to perform an action. I do it later or in another place and I can perform the action.
If you’re getting 403 responses when you try to save the forms, it’s 99% likely that mod_security is intervening, and the version of OJS and PHP won’t have anything to do with the problem – it’ll be dependent on what text you’re submitting in the forms. You can verify by checking your server’s security log for records about what happened when a 403 response was served.
Regards,
Alec Smecher
Public Knowledge Project Team