Project

General

Profile

Actions

Bug #88739

open

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

Added by Jens Jacobsen almost 5 years ago. Updated about 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase + l10n
Target version:
-
Start date:
2019-07-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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" 
      data-namespace-typo3-fluid="true">

<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>

Files

unprotected_page_setup.png (194 KB) unprotected_page_setup.png No access restriction on these pages Jens Jacobsen, 2019-07-12 14:14
site_configuration.png (90.3 KB) site_configuration.png Site configuration Jens Jacobsen, 2019-07-12 14:15
titles_and_slugs_for_pages.png (41.5 KB) titles_and_slugs_for_pages.png Titles and their slugs in table pages Jens Jacobsen, 2019-07-12 14:16
incorrect_links_for_de_and_fr.png (568 KB) incorrect_links_for_de_and_fr.png Incorrect links to de and fr version of access restricted page Jens Jacobsen, 2019-07-12 14:17
typo3_development-localhost-12.07.19 (5.76 MB) typo3_development-localhost-12.07.19 Database dump Jens Jacobsen, 2019-07-12 14:19
uribuilder.zip (4.25 KB) uribuilder.zip Demo extension for the dump Jens Jacobsen, 2019-07-12 14:20
protected_page_setup.png (151 KB) protected_page_setup.png Protected page setup Jens Jacobsen, 2019-07-12 14:26
config.yaml (870 Bytes) config.yaml Site configuration yaml Jens Jacobsen, 2019-07-12 14:29
Screenshot 2019-07-16 09.16.27.png (642 KB) Screenshot 2019-07-16 09.16.27.png TYPO3 8.7.27 + ext:realurl 2.5.0 Jens Jacobsen, 2019-07-16 09:17
frontend-link-translated-access-restricted2.diff (4.23 KB) frontend-link-translated-access-restricted2.diff Alexander Stehlik, 2019-10-23 20:32
Actions

Also available in: Atom PDF