[BUGFIX] Render correct menu item for broken shortcut 64/40364/4
authorAndreas Wolf <andreas.wolf@typo3.org>
Tue, 16 Jun 2015 16:11:05 +0000 (18:11 +0200)
committerBenjamin Mack <benni@typo3.org>
Mon, 22 Jun 2015 09:07:23 +0000 (11:07 +0200)
In case the target of a shortcut is not set, it must be
ensured that the rendered menu item has valid markup.
This is especially important if submenu items are present.

Resolves: #67563
Releases: master
Change-Id: Ie464658706e6754821849ca7c8e75d0121221272
Reviewed-on: http://review.typo3.org/40364
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php

index 71183ad..bbfa660 100644 (file)
@@ -88,6 +88,9 @@ class TextMenuContentObject extends AbstractMenuContentObject {
                                $this->I['val']['additionalParams'] = $this->WMcObj->stdWrap($this->I['val']['additionalParams'], $this->I['val']['additionalParams.']);
                        }
                        $this->I['linkHREF'] = $this->link($key, $this->I['val']['altTarget'], $this->mconf['forceTypeValue']);
+                       if (empty($this->I['linkHREF'])) {
+                               $this->I['val']['doNotLinkIt'] = 1;
+                       }
                        // Title attribute of links:
                        $titleAttrValue = isset($this->I['val']['ATagTitle.']) ? $this->WMcObj->stdWrap($this->I['val']['ATagTitle'], $this->I['val']['ATagTitle.']) . $this->I['accessKey']['alt'] : $this->I['val']['ATagTitle'] . $this->I['accessKey']['alt'];
                        if ($titleAttrValue !== '') {