Bug #88739

UriBuilder does not generate correct uri's for access restricted pages when using more than one language

Added by Jens Jacobsen 4 months ago. Updated 30 days ago.

Should have
Extbase + l10n
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


In TYPO3 9.5 or later, the UriBuilder from extbase cannot create correct translated links for access restricted in other languages than default.

Code used to generate the links from the output

    public function listAction()
        $link = $this->uriBuilder->reset()->setTargetPageUid(4)->build();
        $linkWithRemovedAccessRestriction = $this->uriBuilder->reset()->setLinkAccessRestrictedPages(true)->setTargetPageUid(4)->build();
        $linkProtectedPage = $this->uriBuilder->reset()->setLinkAccessRestrictedPages(true)->setTargetPageUid(7)->build();
        $this->view->assign('link', $link);
        $this->view->assign('linkWithRemovedAccessRestriction', $linkWithRemovedAccessRestriction);
        $this->view->assign('linkProtectedPage', $linkProtectedPage);
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" 

<p>Link: {link}</p>
<p>Link with removed access restriction: {linkWithRemovedAccessRestriction}</p>
<p>Link to a protected page: {linkProtectedPage}</p>

<f:debug inline="true">{_all}</f:debug>

unprotected_page_setup.png View - No access restriction on these pages (194 KB) Jens Jacobsen, 2019-07-12 14:14

site_configuration.png View - Site configuration (90.3 KB) Jens Jacobsen, 2019-07-12 14:15

titles_and_slugs_for_pages.png View - Titles and their slugs in table pages (41.5 KB) Jens Jacobsen, 2019-07-12 14:16

incorrect_links_for_de_and_fr.png View - Incorrect links to de and fr version of access restricted page (568 KB) Jens Jacobsen, 2019-07-12 14:17

typo3_development-localhost-12.07.19 - Database dump (5.76 MB) Jens Jacobsen, 2019-07-12 14:19

uribuilder.zip - Demo extension for the dump (4.25 KB) Jens Jacobsen, 2019-07-12 14:20

protected_page_setup.png View - Protected page setup (151 KB) Jens Jacobsen, 2019-07-12 14:26

config.yaml View - Site configuration yaml (870 Bytes) Jens Jacobsen, 2019-07-12 14:29

Screenshot 2019-07-16 09.16.27.png View - TYPO3 8.7.27 + ext:realurl 2.5.0 (642 KB) Jens Jacobsen, 2019-07-16 09:17

frontend-link-translated-access-restricted2.diff View (4.23 KB) Alexander Stehlik, 2019-10-23 20:32


#1 Updated by Jens Jacobsen 4 months ago

  • File deleted (protected_page_setup.png)

#3 Updated by Jens Jacobsen 4 months ago

#4 Updated by Tymoteusz Motylewski 4 months ago

  • Assignee deleted (Tymoteusz Motylewski)

was this working in v8.7?

#5 Updated by Jens Jacobsen 4 months ago

Tymoteusz Motylewski wrote:

was this working in v8.7?

Haven't tested it yet, but could do it.

#6 Updated by Jens Jacobsen 4 months ago

Jens Jacobsen wrote:

Haven't tested it yet, but could do it.

Works in TYPO3 8.7.27 and realurl 2.5.0

#7 Updated by Alexander Stehlik 30 days ago

Linking to access restricted translated pages seems also to be problematic with TypoScript menus. A short example:

my_menu = HMENU
my_menu {
    special = list
    special.value = <access restricted pid>
    1 = TMENU
    1.showAccessRestrictedPages = NONE

The link is not generated a all for the translated page.

I was able to work around that using the attached patch but still the URL is wrong (based on the default language) as described by Jens. Only workaround for this is to use the same URL for the default language and the translated page.

Also available in: Atom PDF