33501[BUGFIX] Fix links of shortcuts to restricted pages in menus
Commit message
Review
-
Code review CR +2
- Helmut Hummel +2
- Markus Klein +1
-
Verified V +2
- Helmut Hummel +2
- Markus Klein +1
Issues 1
Files 2
Review log 24
-
Markus Klein uploaded patch set 1 10/24/14, 01:41
-
Gernot Ploiner commented on patch set 1 CR +1 V +1 10/24/14, 04:21
Works fine on my live-project. Thank you very much! -
Helmut Hummel commented on patch set 1 10/30/14, 11:34
AbstractMenuContentObject.php:1248what is this line for? It is not needed, is it? I fear it might lead to unwanted side effects to change that here. -
Helmut Hummel commented on patch set 1 10/30/14, 11:35
other than the inline comment code looks good. -
Markus Klein commented on patch set 1 10/30/14, 12:20
AbstractMenuContentObject.php:1248ReplyThe menuArr holds the menu item to render, we need to adjust this to the shortcut, otherwise rendering is wrong -
Helmut Hummel commented on patch set 1 10/30/14, 15:14
AbstractMenuContentObject.php:1248ReplyFor not restricted pages it obviously worked without this line. with your other changes it also works for restricted pages. that is why I'm asking. What does not work for you, if you remove this line? -
Helmut Hummel commented on patch set 1 10/30/14, 15:21
AbstractMenuContentObject.php:1248Replyadditionally $shortcut is only the page record, while $menuItem or $this->menuArr[$key] hold additional information about this menu item. so setting the menu item array entry to just the page record seems wrong to me (besides it does not fix anything as far as I can see) -
Helmut Hummel uploaded patch set 2 10/30/14, 15:59
-
Helmut Hummel commented on patch set 1 10/30/14, 15:59
AbstractMenuContentObject.php:1248ReplyOK, dug a little bit further coming to the conclusion, that this is wrong. $this->menuArr[$key] holds the page record to be linked (which can include some page properties that are evaluated for rendering the menu item), not the data of the page to be linked to. So it must remain untouched and only the link needs to be changed, which actually works perfectly. Will push a new changeset -
Helmut Hummel commented on patch set 2 CR +1 V +2 10/30/14, 16:04
AbstractMenuContentObject.php:1240I think it is cleaner to use (introduce in this case) API instead of "messing" with internal state of TSFE (although it is exposed through a public property unfortunately)TypoScriptFrontendController.php:1597although this does not make a nice API, we cannot change the order of arguments for released versions. But I think it would be OK to change it for master later (not many usages in the core and using the arguments 4+5 can be considered as internal use only) -
Markus Klein commented on patch set 2 10/30/14, 17:31
Did you really test exactly the usecase described in the ticket? -
Markus Klein commented on patch set 2 CR -2 10/30/14, 17:33
blocking the merge until I can verify things again.AbstractMenuContentObject.php:1240ReplyDidn't dare to do so, but was my first thought as well :-) -
Markus Klein commented on patch set 1 10/30/14, 17:35
AbstractMenuContentObject.php:1248ReplyI had to make these changes because of the actions performed in changeLinksForAccessRestrictedPages() Will check again now -
Markus Klein commented on patch set 2 CR -1 V -1 10/30/14, 18:18
Nope, patch set 2 fails for the described test case in the ticket, see my comment there please. -
Helmut Hummel uploaded patch set 3 11/01/14, 10:18
-
Markus Klein commented on patch set 3 CR -1 11/01/14, 18:37
Thanks Helmut for the update. The returnUrl inside the restricted page link is now ok, but the link generated from the shortcut is still pointing to the restricted page and not to the login page (with appended addParams) -
Markus Klein commented on patch set 3 11/01/14, 18:42
The problem is that the checkPageGroupAccess() within the changeLinksForAccessRestrictedPages() method is still performed on the shortcut page and not on the target page, which is stored within the $this->menuArr[$key] variable. For this reason I modified this array in the first patch version. -
Markus Klein commented on patch set 3 11/01/14, 18:44
IMO the menu object does not need to know anything about the shortcut anymore after its target has been determined, hence the menuArr shall contain only information about the actual target. -
Helmut Hummel commented on patch set 1 11/02/14, 15:10
AbstractMenuContentObject.php:1248ReplyWe cannot just change the $this->menuArr[$key] …AbstractMenuContentObject.php:1254… because we would break this functionality here. _OVERRIDE_* stuff can be set by userfuncs before and just overriding this array with the target page row will break this. -
Helmut Hummel uploaded patch set 4 11/02/14, 15:13
-
Helmut Hummel uploaded patch set 5 11/02/14, 15:21
-
Markus Klein voted on patch set 5 CR +1 V +1 11/02/14, 19:37
-
Helmut Hummel voted on patch set 5 CR +2 V +2 11/02/14, 19:42
-
Helmut Hummel merged patch set 5 11/02/14, 19:42