Bug #84052

MenuProcessor does not respect default page target configuration

Added by Cyril Janody almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2018-02-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

How to reproduce

Create a page tree containing external links

Add TypoScript

config {
  intTarget =
  extTarget = _blank
  fileTarget = _blank
}

Define a menu

lib.menu = FLUIDTEMPLATE
lib.menu {
  file = EXT:.....Menu.html

  dataProcessing {
    10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
    10 {
      entryLevel = 0
      levels = 1
      titleField = nav_title // title
      as = menu
    }
  }
}

Debug template menu

<ul>
    <f:for each="{menu}" as="page">
        <li>
            <f:debug>{page}</f:debug>
        </li>
    </f:for>
</ul>

Target is empty... but it should not, right ?!

Thanks for reading.


Files

78151.diff (887 Bytes) 78151.diff Cyril Janody, 2018-03-01 19:48
#1

Updated by Frédéric Lebel almost 4 years ago

  • Complexity set to no-brainer

The bug was fixed in 7.x, and 9.x but not in 8.x.

On the line 1640 in typo3\sysext\frontend\Classes\ContentObject\Menu\AbstractMenuContentObject.php, the following lines are missing :

if((empty($LD['target']) && !empty($this->getTypoScriptFrontendController()->extTarget))) {
$LD['target'] = $this->getTypoScriptFrontendController()->extTarget;
}

ref. : https://forge.typo3.org/issues/78151

#2

Updated by Cyril Janody almost 4 years ago

Hi, here is a patch for TYPO3 8.7 ! ;)

#3

Updated by Guido S. almost 4 years ago

Hi Cyril,

i can verify your patch with 8.7.12. Maybe you feel like apply the patch? TYPO3 documentation: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Index.html

If you have no time or something else, let me know. Then I add the patch.

Best, Guido

#4

Updated by Gerrit Code Review almost 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56447

#5

Updated by Gerrit Code Review almost 4 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56448

#6

Updated by Gerrit Code Review almost 4 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56449

#7

Updated by Gerrit Code Review almost 4 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56447

#8

Updated by Gerrit Code Review almost 4 years ago

Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56447

#9

Updated by Gerrit Code Review almost 4 years ago

Patch set 4 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56447

#10

Updated by Cyril Janody almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF