[BUGFIX] Correctly render menu link for translated shortcuts 41/37841/2
authorMarkus Klein <klein.t3@reelworx.at>
Sat, 14 Mar 2015 16:02:07 +0000 (17:02 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 28 Mar 2015 00:26:01 +0000 (01:26 +0100)
This patch ensure that we only use the shortcut target of the default
language if the shortcut mode is identical to the one of translated page.

Releases: master, 6.2
Resolves: #62189
Change-Id: Ic405c562aee4d09fb8156d403b588562c0b2fa4a
Reviewed-on: http://review.typo3.org/37841
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Jan Helke <typo3@helke.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index b1c94f8..acd04aa 100644 (file)
@@ -1654,7 +1654,7 @@ abstract class AbstractMenuContentObject {
                        // Using raw record since the record was overlaid and is correct already:
                        $originalPage = $this->sys_page->getRawRecord('pages', $page['uid']);
 
-                       if (!empty($originalPage['shortcut'])) {
+                       if ($originalPage['shortcut_mode'] === $page['shortcut_mode'] && !empty($originalPage['shortcut'])) {
                                $page['shortcut'] = $originalPage['shortcut'];
                        }
                }