Project

General

Profile

Actions

Bug #17537

closed

Shortcuts within mounted trees lose MP-Parameter

Added by Alois Baule over 16 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2007-08-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

When mounting a tree which has shortcut pages in it, a link to such a shortcut page has the MP-parameter in it. But when redirecting to the destination page of the shortcut, the MP-parameter seems to get lost.
(So e.g. if the original tree and the mounted tree use different stylesheets, you jump from one style to the other.)

(issue imported from #M6161)


Files

6161.patch (1.11 KB) 6161.patch Administrator Admin, 2010-11-10 19:41
6161-bis.patch (1.68 KB) 6161-bis.patch Administrator Admin, 2010-11-10 19:41
17537-v3.diff (2.78 KB) 17537-v3.diff Updated patch against TYPO3 4.5 Andreas Wolf, 2012-03-30 14:00

Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #17047: Links get wrong MP parameters when two domains share a mounted page treeClosed2007-02-27

Actions
Related to TYPO3 Core - Bug #19379: Mountpoint var ignored when a "Shortcut page" is in the rootlineClosed2008-09-26

Actions
Related to TYPO3 Core - Bug #32938: Link to mounted shortcut page lacks &MP parameterClosedXavier Perseguers2012-01-03

Actions
Related to TYPO3 Core - Bug #14351: Shortcut pages incompatible with mount pointClosed2004-10-11

Actions
Related to TYPO3 Core - Bug #81251: Upon redirect of an overlaid mount point the mount point parameters get lostClosed2017-05-18

Actions
Actions #1

Updated by Popy no-lastname-given over 13 years ago

There is 2 reasons of this (kind of) bug :

First is that tslib_fe->getPageAndRootline method "clean" the MP var if ANY shortcut is found in the rootline (which is definitively wrong, according to the comment :

// We need to clear MP if the page is a shortcut. Reason is IF the short cut goes to another page, then we LEAVE the rootline which the MP expects.
So, as explained by the comment, IF the short cut DOES NOT go to another page, we have a weird behaviour. That's why (based on my comprehension of the mechanics) it should be tslib_fe->getPageShortcut responsability to clear OR NOT the MP var (only if needed).

Second reason is that tslib_fe->getPageShortcut fails himself while resolving shortcut with a "shortcut mode". The function t3lib_pageselect->getMenu is used to get shortcut subpages. This function store MP information in a "virtual" field "_MP_PARAM" in the results, and this information IS NOT USED !

My first patch resolves this 2 problems (the second patch is EXACTLY the same but I HAD TO REMOVE the "while list = each"), assuming the MPvar order is not wrong (in my code) or not important (for the core)

Actions #2

Updated by Julien Bourdin about 13 years ago

The issue is still present in 4.4.

Popy patch is quite OK for the 2 special shortcut modes (first page & random), he let the actual shortcut to clear the MP context.
It would be better to improve the shortcut mode with a test : should the source and the target of the shortcut be in the same rootline, the MP params need to be preserved (IMHO).

Actions #3

Updated by Andreas Wolf about 12 years ago

Still present in at least 4.5 and 4.6, I presume also in 4.7/master.

Attached patch is a reworked and extended version of Popy's original patch, taking into account the new shortcut mode "parent page".

Actions #4

Updated by Andreas Wolf about 12 years ago

The problem is hidden in menus in TYPO3 >= 4.6, because of #32938, but still exists under the hood (= if you call a shortcut directly).

Actions #5

Updated by Gerrit Code Review about 12 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/10091

Actions #6

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10100

Actions #7

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/10101

Actions #8

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/10102

Actions #9

Updated by Stephan Vidar about 11 years ago

Patch 17537-v3.diff solves the problems in TYPO3 4.5.25 but in our case only shortcuts of mode "first subpage of current page". If shortcut-mode is "selected page" the mp-parameters will be lost... But we need this behavior even in shortcuts of mode "selected page" and the following lines fix the problem in our case:

function getPageShortcut($SC,$mode,$thisUid,$itera=20,$pageLog=array()) {
...
switch($mode) {
...
default:
//$this->MP = '';
...
break;
...
}

Actions #10

Updated by Gerrit Code Review almost 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #11

Updated by Gerrit Code Review almost 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #12

Updated by Gerrit Code Review almost 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #13

Updated by Gerrit Code Review almost 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #14

Updated by Andreas Wolf almost 11 years ago

Stephan Vidar wrote:

Patch 17537-v3.diff solves the problems in TYPO3 4.5.25 but in our case only shortcuts of mode "first subpage of current page". If shortcut-mode is "selected page" the mp-parameters will be lost... But we need this behavior even in shortcuts of mode "selected page" and the following lines fix the problem in our case:

function getPageShortcut($SC,$mode,$thisUid,$itera=20,$pageLog=array()) {
...
switch($mode) {
...
default:
//$this->MP = '';
...
break;
...
}

The problem is that shortcuts to pages outside the mountpoint will fail again with your solution. We have to differentiate between two different cases: The shortcut target is either (a) within or (b) not within the mounted subtree where the shortcut resides.

Ideally, this should be respected when generating the menu links, though it will still work if it is only done when resolving the shortcut.

Actions #15

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #16

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #17

Updated by Gerrit Code Review over 9 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/10100

Actions #18

Updated by Gerrit Code Review over 9 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/10100

Actions #19

Updated by Gerrit Code Review about 8 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #20

Updated by Gerrit Code Review about 8 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/10100

Actions #21

Updated by Mathias Schreiber over 7 years ago

  • Status changed from Under Review to Accepted
  • Is Regression set to No
Actions #22

Updated by Tymoteusz Motylewski over 6 years ago

  • Related to Bug #81251: Upon redirect of an overlaid mount point the mount point parameters get lost added
Actions #23

Updated by Susanne Moog over 6 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #24

Updated by Christian Kuhn over 5 years ago

  • Status changed from Accepted to New
Actions #25

Updated by Susanne Moog over 5 years ago

  • Sprint Focus set to On Location Sprint
Actions #26

Updated by Nicolai Schirawski over 5 years ago

In TYPO3 9.5.1-dev, the issue is solved:

Links to external urls in mounted subtrees don't keep the MP-Parameter.
In shortcuts the MP-Parameter ist kept.

Actions #27

Updated by Nicolai Schirawski over 5 years ago

in TYPO3 8.7.20-dev the issue is solved, too.

Same behaviour like in 9.5

Actions #28

Updated by Anja Leichsenring over 5 years ago

  • Status changed from New to Resolved
Actions #29

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF