An unexpected error occurred. You may have been logged out. Please reload the page and try again

We are facing the same problem whenever we try to publish a submission immediately, when we schedule it for the next day the status of the article changes to “scheduled” but the day passes and the article doesn’t get published on the website. can you please help?

Hi @pkp,

This is the same issue you posted at Submission scheduled but not published, correct? Please don’t double-post; it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team

I have got the same issue. I am using ojs 3.2.0-2. PHP 7.3 and IIS.
Here is the screenshot of Settings->Website
I am not able to save any changes in this section. Kindly guide accordingly @asmecher

Another look at the network tab on the same page. I am getting this :

Here are the request and response headers:

In google chrome: (I have enabled PUT verbs in the website handler mapping for php)


Any Ideas? @asmecher

Hi @Farhan_Abbas,

The 405 error is something you’ll have to fix at your web server level; the request is being blocked by your server before it even gets to OJS.

Regards,
Alec Smecher
Public Knowledge Project Team

Trying to find a solution for that… did not face any such issues before… hopefully will get a work around…

Hi there,

I’ve been having the same problem - can’t save any changes and the system keeps coming up with this message about an unexpected error. I contacted my hosting provider and explained that it might be the 405 error (PUT requests blocked by the server), and the tech support fixed it. Unfortunately, this didn’t solve the problem. If I’m not mistaken, this is the line from the log:

Hi @hobbitelanor,

Double-check to make sure your PHP meets the minimum requirements.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, thank for your reply. My hosting is currently running on PHP 7.3.18. Could you please point me to the list of php requirements? It’s just that everything I’ve been using as a reference so far has been in conformity with the PHP settings on my server. Thanks again

Hi @hobbitelanor,

PHP 7.3 should be fine – but are you sure that’s what’s running OJS? Sometimes CPanel can run several versions of PHP and it can be ambiguous which is actually running. Could you verify with a phpinfo script?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,
After upgrading to OJS 3.x, I also faced this error message (in the title) and unable to save changes at the Site Administration page.
This error seems typically occuring on systems having multiple journals with their individual domains on a single OJS installation. If rewrite is enabled, and index.php removed via mod_rewrite.
I can’t edit the journals from site administration page (the page that we create journals).
I can change settings of the journals on the main domain (if they don’t have their own domain). I can also change every setting of Journals when I logged in using Journal’s domain.
To me, it seems arising from;

Access to XMLHttpRequest at 'https://www.adlitipbulteni.xyz/atb/$$$call$$$/grid/settings/user/user-grid/fetch-grid?_=1593366154357' from origin 'https://journals.akademisyen.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Since the journal domains (adlitipbulteni.xyz etc…) are alias, I could’nt find a way to insert Header Set Access Controls to the apache conf file for journal domains. Placing a .htaccess file with the code to the public_html of journals.akademisyen.xyz doesn’t have any effect on removing CORS errors.
Any suggesstions?
Best Regards,
I use Webmin panel, PHP 7.4, Apache 2.4.6 on CentOS Linux 7.8.

Hi @drugurkocak,

See e.g. this Stackoverflow post for some suggestions on getting CORS headers working in .htaccess. I think that’s probably the best place for it.

If adding CORS headers via .htaccess isn’t working, you could also modify the PHP code to add them there. However, you’ll have to look around for the best place to put this – PKPTemplateManager.inc.php and PKPRouter.inc.php might be good places to look.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hello all, @asmecher and anyone who may be able to help,

We’re migrating to OJS 3 and are having problems with savign administration settings.
Nothing is saved and the “an unexpecte error ocurred. you may have been logged out” message is always displayed.
[update @ 15h35 local time]
Also, we’re unable to send emails… not sure it’s related, but nothing logged in. Error message “There was a problem sending an email message. Please try again later, or contact your system administrator.” is displayed…

Where can we look for the source of the problem to find a fix?

ERROR LOG

[Thu Jul 09 11:33:01.493413 2020] [php7:notice] [pid 363010] [client 192.168.0.240:33606] PHP Notice: Trying to access array offset on value of type null in /var/www/revista.ibict.br/plugins/themes/default/DefaultThemePlugin.inc.php on line 204, referer: http://revista.ibict.br/ciinf?i
[Thu Jul 09 11:33:02.866283 2020] [php7:notice] [pid 363007] [client 192.168.0.240:33622] PHP Notice: Trying to access array offset on value of type null in /var/www/revista.ibict.br/plugins/themes/default/DefaultThemePlugin.inc.php on line 204
[Thu Jul 09 11:33:03.866325 2020] [php7:notice] [pid 363017] [client 192.168.0.240:33627] PHP Notice: Trying to access array offset on value of type null in /var/www/revista.ibict.br/plugins/themes/default/DefaultThemePlugin.inc.php on line 204
[Thu Jul 09 11:33:03.893697 2020] [php7:notice] [pid 363017] [client 192.168.0.240:33627] ojs2: 404 Not Found
[Thu Jul 09 11:33:04.124690 2020] [php7:notice] [pid 363013] [client 192.168.0.240:33628] PHP Notice: Trying to access array offset on value of type null in /var/www/revista.ibict.br/plugins/themes/default/DefaultThemePlugin.inc.php on line 204, referer: https://www.google.com/
[Thu Jul 09 11:33:04.310890 2020] [php7:warn] [pid 363007] [client 192.168.0.240:33622] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[Thu Jul 09 11:33:04.312366 2020] [php7:warn] [pid 363007] [client 192.168.0.240:33622] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[Thu Jul 09 11:33:04.368477 2020] [php7:notice] [pid 363009] [client 192.168.0.240:33630] PHP Notice: Trying to access array offset on value of type null in /var/www/revista.ibict.br/plugins/themes/default/DefaultThemePlugin.inc.php on line 204
[Thu Jul 09 11:33:08.526154 2020] [php7:warn] [pid 363013] [client 192.168.0.240:33628] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[Thu Jul 09 11:33:08.527572 2020] [php7:warn] [pid 363013] [client 192.168.0.240:33628] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[Thu Jul 09 11:33:14.175693 2020] [php7:error] [pid 363008] [client 192.168.0.13:44302] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/revista.ibict.br/plugins/generic/customLocale/CustomLocalePlugin.inc.php:32\nStack trace:\n#0 /var/www/revista.ibict.br/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): CustomLocalePlugin->register()\n#1 /var/www/revista.ibict.br/lib/pkp/classes/plugins/PluginRegistry.inc.php(144): PluginRegistry::register()\n#2 /var/www/revista.ibict.br/lib/pkp/classes/core/Dispatcher.inc.php(132): PluginRegistry::loadCategory()\n#3 /var/www/revista.ibict.br/lib/pkp/classes/core/PKPApplication.inc.php(279): Dispatcher->dispatch()\n#4 /var/www/revista.ibict.br/index.php(68): PKPApplication->execute()\n#5 {main}\n thrown in /var/www/revista.ibict.br/plugins/generic/customLocale/CustomLocalePlugin.inc.php on line 32
[Thu Jul 09 11:33:14.613180 2020] [php7:warn] [pid 363010] [client 192.168.0.240:33606] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30, referer: http://revista.ibict.br/ciinf?i
[Thu Jul 09 11:33:14.615819 2020] [php7:warn] [pid 363010] [client 192.168.0.240:33606] PHP Warning: Creating default object from empty value in /var/www/revista.ibict.br/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^

Hi @ramon,

I see this:

[Thu Jul 09 11:33:14.175693 2020] [php7:error] [pid 363008] [client 192.168.0.13:44302] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/revista.ibict.br/plugins/generic/customLocale/CustomLocalePlugin.inc.php:32

It’s probably related to this.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi
I am having a similar error, just for a specific user. The logs show:

2020/07/10 11:38:18 [error] 13688#13688: *9235739 FastCGI sent in stderr: "PHP message: PHP Warning:  Declaration of CustomHeaderPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/linguamatica/root/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 0PHP message: Slim Application Error:
Type: Error
Message: Call to a member function getFullName() on null
File: /home/linguamatica/root/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php
Line: 480
Trace: #0 /home/linguamatica/root/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php(69): ReviewAssignmentDAO->_fromRow(Array)
#1 /home/linguamatica/root/lib/pkp/classes/submission/reviewAssignment/ReviewAssignmentDAO.inc.php(41): ReviewAssignmentDAO->_getReviewAssignmentsArray('SELECT r.*, r2....', Array)
#2 /home/linguamatica/root/lib/pkp/classes/submission/reviewRound/ReviewRound.inc.php(209): ReviewAssignmentDAO->getByReviewRoundId(95)
#3 /home/linguamatica/root/lib/pkp/classes/services/PKPSubmissionService.inc.php(837): ReviewRound->determineStatus()
#4 /home/linguamatica/root/lib/pkp/classes/services/PKPSubmissionService.inc.php(533): PKP\Services\PKPSubmissionService->getPropertyStages(Object(Article))
#5 /home/linguamatica/root/lib/pkp/classes/services/PK" while reading response header from upstream, client: 193.137.65.16, server: linguamatica.com, request: "GET /index.php/linguamatica/api/v1/_submissions?status%5B%5D=4&status%5B%5D=3&assignedTo=6&searchPhrase=&count=20&offset=0&_=1594377498189 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "linguamatica.com", referrer: "https://linguamatica.com/index.php/linguamatica/submissions"
2020/07/10 11:38:18 [error] 13688#13688: *9235753 FastCGI sent in stderr: "PHP message: PHP Warning:  Declaration of CustomHeaderPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/linguamatica/root/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 0" while reading response header from upstream, client: 193.137.65.16, server: linguamatica.com, request: "GET /index.php/linguamatica/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid?_=1594377498191 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "linguamatica.com", referrer: "https://linguamatica.com/index.php/linguamatica/submissions"

Any idea what might be going on? This appeared from nothing (the user was able to use the system normally, but without updating the server or the code, this error started).

Tried now to update the git version (branch stable-3_1_2 (ojs)).

Any hint is very welcome.
Alberto

Hi @ambs,

That’s a different error, and it looks like it’s already posted here. (It’s best not to post the same issue multiple times, as it clutters the forum.) I’ll respond to the other post.

Regards,
Alec Smecher
Public Knowledge Project Team

Sure, it just seemed similar.

Hello @asmecher, @NateWr, @ctgraham and everyone else,

Sorry to “revive” the post.
Since we’re having problems scheduling articles in 3.1, we are testing OJS 3.2 (latest version).
On this server config with Ubuntu 20, we are unable to save admin settings.
Everything else works, including scheduling articles (need to assign a Production editor, but, that’s ok).

Server Information
Setting Name	Setting Value
OS platform	Linux
PHP version	7.4.3
Apache version	Apache/2.4.41 (Ubuntu)
Database driver	mysqli
Database server version	10.5.4-MariaDB-1:10.5.4+maria~focal

This is an update from the one in production, and the site doesn’t have the Default Theme enabled, as our theme is not updated to 3.2, and I can’t save settings to apply the only available theme.
Any ideas? How do we fix those PUT issues? I have no idea how…

In the screenshot I can see that the URL of the page you’re visiting is /admin/settings but the URL of the PUT request is %2A/api/v1/site/theme. This may indicate that the URL routing is causing a problem. I’d recommend checking the base_url settings in your config file alongside the .htaccess on your server.