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

HI, I am having the same issue. When I click on; Schedule for Publication, I get this error:

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

Clicking on F12 show the following error:

While the error log entries are:

[26-Sep-2020 11:16:20 UTC] Slim Application Error:

Type: Exception

Message: DB Error: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation ‘=’ Query: SELECT i.*

FROM issues i,

submissions a

LEFT JOIN publications p ON (p.publication_id = a.current_publication_id)

LEFT JOIN publication_settings ps ON (ps.publication_id = p.publication_id)

WHERE ps.setting_name = ? AND ps.setting_value = CAST(i.issue_id as CHAR) AND

a.submission_id = ? AND

a.context_id = i.journal_id

File: /home/********/public_html/journals/lib/pkp/classes/db/DAO.inc.php

Line: 703

Trace: #0 /home/********/public_html/journals/lib/pkp/classes/db/DAO.inc.php(103): DAO->handleError(Object(ADODB_mysqli), ‘SELECT\ti.*\n\t\t\tF…’)

#1 /home/********/public_html/journals/classes/issue/IssueDAO.inc.php(560): DAO->retrieve(‘SELECT\ti.*\n\t\t\tF…’, Array)

#2 /home/********/public_html/journals/classes/submission/Submission.inc.php(86): IssueDAO->getBySubmissionId(60)

#3 /home/********/public_html/journals/lib/pkp/classes/services/PKPPublicationService.inc.php(572): Submission->_getContextLicenseFieldValue(NULL, 3, Object(Publication))

#4 /home/********/public_html/journals/lib/pkp/api/v1/submissions/PKPSubmissionHandler.inc.php(743): PKP\Services\PKPPublicationService->publish(Object(Publication))

#5 [internal function]: PKPSubmissionHandler->publishPublication(Object(Slim\Http\Request), Object(APIResponse), Array)

#6 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(APIResponse), Array)

#7 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(APIResponse), Array)

#8 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(APIResponse))

#9 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))

#10 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(APIResponse))

#11 /home/********/public_html/journals/lib/pkp/classes/security/authorization/internal/ApiAuthorizationMiddleware.inc.php(77): Slim\App->__invoke(Object(Slim\Http\Request), Object(APIResponse))

#12 [internal function]: ApiAuthorizationMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))

#13 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiAuthorizationMiddleware), Array)

#14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))

#15 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Slim\App))

#16 /home/********/public_html/journals/lib/pkp/classes/security/authorization/internal/ApiCsrfMiddleware.inc.php(46): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#17 [internal function]: ApiCsrfMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#18 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiCsrfMiddleware), Array)

#19 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#20 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#21 /home/********/public_html/journals/lib/pkp/classes/security/authorization/internal/ApiTokenDecodingMiddleware.inc.php(82): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#22 [internal function]: ApiTokenDecodingMiddleware->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#23 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ApiTokenDecodingMiddleware), Array)

#24 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#25 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#26 /home/********/public_html/journals/lib/pkp/classes/handler/APIHandler.inc.php(68): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#27 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#28 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#29 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#30 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#31 /home/********/public_html/journals/lib/pkp/classes/handler/APIHandler.inc.php(127): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#32 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#33 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#34 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#35 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#36 /home/********/public_html/journals/lib/pkp/classes/handler/APIHandler.inc.php(132): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#37 [internal function]: APIHandler->{closure}(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#38 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)

#39 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#40 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(APIResponse), Object(Closure))

#41 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(APIResponse))

#42 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(APIResponse))

#43 /home/********/public_html/journals/lib/pkp/lib/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(APIResponse))

#44 /home/********/public_html/journals/lib/pkp/classes/core/APIRouter.inc.php(115): Slim\App->run()

#45 /home/********/public_html/journals/lib/pkp/classes/core/Dispatcher.inc.php(143): APIRouter->route(Object(Request))

#46 /home/********/public_html/journals/lib/pkp/classes/core/PKPApplication.inc.php(279): Dispatcher->dispatch(Object(Request))

#47 /home/********/public_html/journals/index.php(68): PKPApplication->execute()

#48 {main}

View in rendered output by enabling the “displayErrorDetails” setting.

Can someone assist me please? My OJS version is: Current version: 3.2.1.1. This is not a fresh install but upgrade from the recent previous version.

Hi @esciencepress,

See this thread (and the linked threads from there).

Regards,
Alec Smecher
Public Knowledge Project Team

hello i got the solution for this case, you just need to change charset on config.inc.php to be carset utf-8 for all carset

1 Like

Screenshot (13)

Hello, a have simillar problem when i have update to new OJS. how to fix it.

Hi Alec,

We are having problems in test- and production environment doing a simple “save” on:
Administration → Site settings → Theme → Appearance → Save.
We get the unexpected error message on OJS after upgrading to 3.2.1.1.

Browser debugging shows a strange error on: jquery request:
https://openjournalstest.maastrichtuniversity.nl/*/api/v1/site/theme
It has a strange %2A/ extra in the request. As I leave that %2A out, I get a proper json response…

How can we fix this?

Best,
Peter

thankyou Bro, Our journal problem is fixed.

Hi! So, I’m writing my problem here because I don’t want to open new discussion. I have the same problem as in title described. Any change I want to save on my OJS website cannot be done and it is giving me the error: An unexpected error occurred. You may have been logged out. Please reload the page and try again.

So, I can’t save any changes in settings, submission etc. I tried enabling PUT requests for my website in IIS and there was no luck. It happened when I upgraded OJS from version 3.1.2 to version 3.2.1.-2.

I keep getting this errors in PHP errors log:

[18-Feb-2021 09:14:53 Europe/Belgrade] PHP Warning: file_put_contents(D:\ojs\cache\fc-pluginSettings-3-defaultthemeplugin.php): failed to open stream: Resource temporarily unavailable in D:\ojs\lib\pkp\classes\cache\FileCache.inc.php on line 90
[18-Feb-2021 09:14:54 Europe/Belgrade] PHP Fatal error: Uncaught Error: Call to a member function getLocalizedTitle() on null in D:\ojs\lib\pkp\controllers\grid\notifications\NotificationsGridCellProvider.inc.php:159
Stack trace:
#0 D:\ojs\lib\pkp\controllers\grid\notifications\NotificationsGridCellProvider.inc.php(44): NotificationsGridCellProvider->_getTitle(Object(Notification))
#1 D:\ojs\lib\pkp\classes\controllers\grid\GridCellProvider.inc.php(56): NotificationsGridCellProvider->getCellActions(Object(Request), Object(GridRow), Object(GridColumn))
#2 D:\ojs\lib\pkp\classes\controllers\grid\GridHandler.inc.php(1104): GridCellProvider->render(Object(Request), Object(GridRow), Object(GridColumn))
#3 D:\ojs\lib\pkp\classes\controllers\grid\GridHandler.inc.php(1011): GridHandler->_renderCellInternally(Object(Request), Object(GridRow), Object(GridColumn))
#4 D:\ojs\lib\pkp\classes\controllers\grid\GridHandler.inc.php(988): GridHandler->renderRowInternally(Object(Request), Objec in D:\ojs\lib\pkp\controllers\grid\notifications\NotificationsGridCellProvider.inc.php on line 159

As one error says getLocalizedTitle() is null, I tried removing null titles from table in database and the problem still persists. Any ideas what could be the problem?

Hi @asmecher
I have the same problem as described in this thread for saving the setting:

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

I also tried @GusariManuaba’s solution but my sites charsets in config.inc.php are already “utf-8”.
My PHP Version is: 7.2.34 and running on windows host under IIS web server.

did anyone found the solution?

Hi @Amin_Karampour,

This is an older post. Can you please post your question in a new forum post with the details you’ve described here - feel free to link to this forum post as well. This helps us to keep the forum organized and avoid clutter.

Best regards,

Roger
PKP Team