#93521Available cookies from previous request are lost, after being redirected to an error page by the PageContentErrorHandler
Description
In our SiteConfiguration we defined a couple errorHandler’s of type “Show Content from Page [Page]”, which is the PageContentErrorHandler.
We use this for:
- 404
- 403
- 401
- 500
- 503
I managed to fix this by passing the cookies from the previous request with the CookieJar class from Guzzle. I attached the patch that we use in our codebase as .diff file.
Reviews 1
Related issues 1
Files 1
History 811
-
Georg Ringer changed status
NewAccepted assigned to Georg Ringer <span data-processor="relativetime" data-value="2021-02-17T07:25:40+00:00" > 02/17/21, 07:25 </span> -
Gerrit Code Review pushed patch set 1 for master to change 67958 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2021-02-17T08:22:48+00:00" > 02/17/21, 08:22 </span> -
Gerrit Code Review pushed patch set 2 for master to change 67958 <span data-processor="relativetime" data-value="2021-02-22T20:07:11+00:00" > 02/22/21, 20:07 </span>
-
Gerrit Code Review pushed patch set 3 for master to change 67958 <span data-processor="relativetime" data-value="2021-03-24T20:11:01+00:00" > 03/24/21, 20:11 </span>
-
Georg Ringer changed status
Under ReviewNew <span data-processor="relativetime" data-value="2021-10-19T18:50:22+00:00" > 10/19/21, 18:50 </span> -
Georg Ringer changed removed the assignee <span data-processor="relativetime" data-value="2022-07-18T13:17:04+00:00" > 07/18/22, 13:17 </span>
-
Oliver Hader commented and changed Tags pending-close <span data-processor="relativetime" data-value="2022-11-03T14:55:28+00:00" > 11/03/22, 14:55 </span>
-
Kevin von Spiczak commented <span data-processor="relativetime" data-value="2022-12-14T12:54:42+00:00" > 12/14/22, 12:54 </span>
I just came back to this issue, since the latest changes (11.5.20) in the PageContentErrorHandler broke my patch.
First I wanted to fix my patch, but then I noticed it is not needed anymore apparently. My fe_user cookie for instance is not lost anymore, when I reach a 404 page. Before I would login -> force a 404 page and on that page I could see in the navigation menu, that my account module is showing the “logged in state”, but the “logged out state”.Maybe someone else can verify this on their end too, then we can close this issue.
-
Rémy DANIEL commented <span data-processor="relativetime" data-value="2026-09-24T12:57:43+00:00" > 09/24/26, 12:57 </span>
I cant reproduce it.
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-08T19:54:29+00:00" > 11/08/26, 19:54 </span>Resolved: since TYPO3 v11.4 (#94402, opt-in) and by default since v12.0, the PageContentErrorHandler renders error pages from a page of the instance as an internal sub-request derived from the original request, so its cookies (and with it the frontend user session) are kept. Only error pages configured as external URLs are still fetched via HTTP, intentionally without forwarding cookies. Confirmed as not reproducible by the reporter and in comment #6. Closing.
-
Benni Mack changed Related to #94402 <span data-processor="relativetime" data-value="2026-11-08T19:54:41+00:00" > 11/08/26, 19:54 </span>
Change-set has been abandoned by author…