Random permissions error #14762
-
Hello Ever since switching to Pimcore X, I am getting a seemingly random "permission denied" error message. It seems like the message shows up when I have been idle in Pimcore for some time, but I am not sure what is triggering it. It happens for admin or any other user. I keep seeing a call to "/admin/notification/find-last-unread" at the time when the message shows up, but I don't know if thats is the trigger or the result of the error. I am running Apache with PHP-FPM, all set up through Plesk. It happens on different Pimcore X Versions with different PHP versions. I followed the documentation regarding file permissions for /var /public/var and the user. The PHP user has read and write access to everything. I cleared the cache and rebuild the symlinks via SSH with the same user. Sometimes the error shows up when coming back to Pimcore after being idle for some time, sometimes it shows up right away when adding a redirect or any other modification. Sometimes it doesn't show up for days. After the error, any action in Pimcore keeps showing the error again, until you refresh the browser tab and you get redirected to /admin/login . Am I missing a step in setting up a project? How can I go about debugging this? It seems like one of the admin JS files is running into this issue. usagelog.log shows this at the time of the error message: `2023-03-22T10:49:57+0100 : 2|Pimcore\Bundle\AdminBundle\Controller\Admin\NotificationController::findLastUnreadAction|pimcore_admin_notification_findlastunread|[]|{"lastUpdate":"1679478567"} 2023-03-22T10:50:27+0100 : 2|Pimcore\Bundle\AdminBundle\Controller\Admin\NotificationController::findLastUnreadAction|pimcore_admin_notification_findlastunread|[]|{"lastUpdate":"1679478597"} 2023-03-22T11:02:07+0100 : 0|Pimcore\Bundle\AdminBundle\Controller\Admin\LoginController::loginAction|pimcore_admin_login|[]|{"perspective":""}` The browser console shows this: `Failed to load resource: the server responded with a status of 403 (Forbidden) xhr request to /admin/notification/find-last-unread failed The error message in german: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The error message might be misleading as it's kind of generic for all kind of errors in communication. I suspect there is a problem with your PHP/Symfony session handling/configuration. Probably your session became invalid for some reason and Pimcore backend fails to communicate. You may want to try a search for "Plesk Symfony session" to find related issues. Maybe it's a session-cleanup-script, maybe By the way: You can easily reproduce this kind of error by modifying/invalidating your PHPSESSID cookie in your browser's dev-tools. |
Beta Was this translation helpful? Give feedback.
-
@Myrmidonut did you find out what causes this? I'm getting this same: |
Beta Was this translation helpful? Give feedback.
This is the message it appears when session is expired due to idle and user is logged out in another tab or so.
Maybe have a look and tweak your
gc_maxlifetime
settings (in the php.ini,htaccess and so), by default, it seems just 2 minuteshttps://github.com/pimcore/admin-ui-classic-bundle/blob/10ea29130a41a9fefbcfc57b082f0ec5e3637a9b/src/Controller/Admin/IndexController.php#L283-L285