contao/test — Issue #2843: 403-page is not using the language root
Author: aschempp
Created: 2011-11-29 10:25:24+00:00
State: open
Labels: Defect, frontend

**Setup:**
* 403-Page for each language with a redirect to login site
* Protected page

**Situation:**
When accessing the protected page, the 403-access is redirecting to the login page of the fallback language in all root pages

**Reason:**
Page403 is using getRootIdFromUrl() instead of the already found $objPage->rootId from index.php

**Solutions:**
# Pass the root id as second argument from index.php to the Page403 object and use it instead of getRootIdFromUrl()
# Pass $objPage to all page types and rewrite Page403, Page404 and PageRoot to use the object instead of an ID

[Download the attachments](http://www.contao.org/tl_files/tickets/2843.zip "Download the attachments of this ticket")

--- _Originally created on February 3rd, 2011, at 05:06pm (ID 2843)_