Project

General

Profile

Actions

Bug #84052

closed

MenuProcessor does not respect default page target configuration

Added by Cyril Janody about 6 years ago. Updated over 5 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
Actions #1

Updated by Frédéric Lebel about 6 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

Actions #2

Updated by Cyril Janody about 6 years ago

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

Actions #3

Updated by Guido S. about 6 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

Actions #4

Updated by Gerrit Code Review about 6 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

Actions #5

Updated by Gerrit Code Review about 6 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

Actions #6

Updated by Gerrit Code Review about 6 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

Actions #7

Updated by Gerrit Code Review about 6 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

Actions #8

Updated by Gerrit Code Review about 6 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

Actions #9

Updated by Gerrit Code Review about 6 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

Actions #10

Updated by Cyril Janody about 6 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF