#25140RETURN_URL in menus is not created correctly
Description
We actually have two sites where access restricted pages have to appear in menus. The menus have the options
showAccessRestrictedPages = loginPageId
showAccessRestrictedPages.addParams = &redirect_url=###RETURN_URL###
set.
In one case ###RETURN_URL### is replaced with the complete url, including all parameters. That results in an url like “/path/to/login-page/?redirect_url=/path/to/login-page/?redirect_url=/path/to/restriced-page/”.
In the second website ###RETURN_URL### is replaced just with a blank string.
The method changeLinksForAccessRestrictedPages() in class tslib_menu replaces ###RETURN_URL### with $LD[‘totalURL’]. $LD[‘totalURL’] is filled with $this->parent_cObj->lastTypoLinkUrl, which likely causes the problem.
Is there a certain reason to store the url in this way?
Or do you know of any misconfigration that may cause our problems? I did not check this behavious on a “clean” site yet.
IMHO is would make sense to create the url to restricted pages again with $this->parent_cObj->typoLink_Url() and before that temporarily set typolinkLinkAccessRestrictedPages to ‘NONE’ to get the link as if the page was not protected.
(issue imported from #M17718)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.