Bug #88739

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

Added by Jens Jacobsen 2 months ago. Updated 2 months ago.

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

0%

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>

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

History

#1 Updated by Jens Jacobsen 2 months ago

  • File deleted (protected_page_setup.png)

#3 Updated by Jens Jacobsen 2 months ago

#4 Updated by Tymoteusz Motylewski 2 months ago

  • Assignee deleted (Tymoteusz Motylewski)

was this working in v8.7?

#5 Updated by Jens Jacobsen 2 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 2 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

Also available in: Atom PDF