Bug #102339
open
Typo3 11 PageLinkBuilder does not take shortcut_mode and target of translated page into account
Added by Sruthi Kumar G about 1 year ago.
Updated 8 months ago.
Category:
Content Rendering
Description
I have edited shortcut mode and target page of translated page. But in menu the link rendered is based on default language page properties.
In this case, it's always page id 29, not 1117.
Files
Same problem here. One of our customer heavily relies on different shortcut targets per language and after upgrading to TYPO3 11 (from 8.7) it doesn't work anymore.
As far as I could see it's not only restricted to MenuProcessor. It seems to be a problem in the hole PageLinkBuilder. If you add a link to such a shortcut page e.g. in a text content element, the link is also wrong.
- Subject changed from Typo3 11 menu processor does not take shortcut_mode and target of translated page into account to Typo3 11 PageLinkBuilder does not take shortcut_mode and target of translated page into account
Yes, this seems to be an issue with PageLinkBuilder.I added a fix I found in a similar issue and it's fixed for now. But would need a permanent solution rather than a unreliable hotfix.
I am unsure about how to reproduce this one.
I have done the following test:
Prerequisites¶
- TYPO3 13.1.0-dev (latest master)
- two languages: Italian (0) and English (1)
- Let's say that I have
- a page in Italian called "TEST 1"
- another page "TEST 2" which has been translated "TEST 2 ENG"
- a menu built in TypoScript:
page.20 = HMENU
page.20 {
1 = TMENU
1.expAll = 1
1.wrap = <ul>|</ul>
1.NO.wrapItemAndSub = <li>|</li>
1.CUR = 1
1.CUR.wrapItemAndSub = <li> <strong>current: - </strong>|</li>
1.ACT = 1
1.ACT.wrapItemAndSub = <li> <strong>active: - </strong>|</li>
2 < .1
3 < .1
}
The test¶
- Create a new page "T102339", type: shortcut page in Italian (main language)
- Shortcut Mode: selected page
- Shortcut Target: "TEST1"
- Translate "T102339" into english ""T102339 ENG"
- Edit it
- Shortcut Target: Translation behavior: custom value ; select the target "TEST2 ENG"
- save and visit the frontend
Results¶
- in the ITALIAN frontend version of the site, the menu item for the shortcut reads "T102339" and it leads to "TEST1"
- in the ENGLISH frontend version of the site, the menu item for the shortcut reads "T102339 ENG" and it leads to "TEST2 ENG"
Is this the expected behavior? Or is a different test necessary?
Additional notes¶
I've found that the interface for the translated shortcut target is a bit confusing: it lets me assign a different target page, but with the option "translation behavior": Value of default language still selected, so the different target page is not taken into account at all!
It seems that this bug is fixed since TYPO3 12 LTS at least for the HMENU.
The bug is still present in "normal" links. If i create a link in a text content element to the shortcut page, the link on the translated page points to the wrong place. Tested with TYPO3 12.4.13
- Related to Bug #102694: Shortcuts do not respect different settings in alternative languages added
Also available in: Atom
PDF