Project

General

Profile

Actions

Bug #75974

closed

UriBuilder will not generate pageType 0 links

Added by Bernhard Kraft almost 8 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-04-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When the current page type (TSFE->type) is different than "0" the UriBuilder can not generate any links to pageType "0" as the "targetPageType" member variable gets compared against being different from "0".

Just changing the check to:

if ($this->targetPageType !== (int)$GLOBALS['TSFE']->type) {

https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php#l719

will break existing templates. Every link for non-type-0 pages would need to have the "pageType" parameter - else every link would link back to type-0. To solve this issue a similar approach than for the $targetPageUid has to get taken (Using "NULL" as default then targetPageType is not set).

There is no patch attached because currently even when fixing this issue in the UriBuilder the whole link will not respect the "targetPageType" from the UriBuilder when the "linkVars" TypoScript option is set. As this is normally the case for the "type" parameter changing this issue will not resolve the problem.

So currently the solution is, to set the "type" parameter in the additionalParams of an f:uri.page viewHelper for example:

{f:uri.page(pageUid: '{settings.productPdfPage}', additionalParams: '{type: \'0\', preispdf: \'1\', hotelid: \'{product}\'}')}

Actions #1

Updated by Bernhard Kraft almost 8 years ago

Is it possible to change this issue to "won't" fix but still let it show up when searching.

This "is" an issue but not easily fixable currently except by touching the "mother of all link generation methods "TSFE->tmpl->linkData()" which could break a lot.

Actions #2

Updated by Riccardo De Contardi over 6 years ago

  • Category set to Extbase
Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from New to Needs Feedback

Hey Bernhard,

is this still an issue? As far as I read the code, if you do NOT add a page type in your Extbase configuration / Fluid ViewHelper, it is using pageType=0 (basically omitting it via linkData as well). Well, if you add config.linkVars = type - then this could become an issue.

Could you share more details?

Actions #4

Updated by Riccardo De Contardi almost 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or ping me.

Thank you and best regards

Actions

Also available in: Atom PDF