Bug #87815

Page shortcut not working for translated pages

Added by Philipp Seiler 5 months ago. Updated about 2 months ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-02-28
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
page,link,shortcut,translation,language
Complexity:
Is Regression:
Sprint Focus:

Description

  • Have a page A with several subpages.
  • Page A is set as shortcut mode and "first subpage of selected/current page".
  • In install tool, pages that are not translated are hidden.
  • Subpages are not all translated:

A in sys_language_uid = 0 & A in sys_language_uid = 1
⮡ A1 in sys_language_uid = 0
⮡ A2 in sys_language_uid = 0
⮡ A3 in sys_language_uid = 0 & A3 in sys_language_uid = 1

  • Visit frontend in sys_language_uid = 1.
  • Expected result: Shortcut-Link on page A links to the first available translated page, in this case A3 in sys_language_uid = 1.
  • Actual result: Shortcut-Link on page A links to nothing, as page seems to be not found.

History

#1 Updated by Christian Eßl about 2 months ago

I can reproduce this bug.

It looks like PageRepository::getPageShortcut() does not take the "hidePagesIfNotTranslatedByDefault" setting into account for getting the first subpage. Unfortunately, large parts of the PageRepository code base are pretty messy right now and fixing this could probably have some unwanted side effects...

I will try to create a patch with a few functional tests.

#2 Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60825

#3 Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60825

#4 Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60826

#5 Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60826

#6 Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60825

#7 Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60825

#8 Updated by Gerrit Code Review about 2 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60825

Also available in: Atom PDF