#91389viewhelper f:uri produces broken URLs when used with parameter noCache="1"
Description
This viewhelper:
<f:uri pageuid="{subscribeVerifyUid}" extensionname="fpnewsletter" pluginname="pi1" controller="Log" action="verify" arguments="{uid: uid, hash: hash}" nocache="1" absolute="1"></f:uri>results in a messed up URI:
When i delete noCache=“1” i get:
which seems correct on first look but is messed up too: the arguments are missing.
I assume this is a side effect from the last update (9.5.17). Until 9.5.16 it worked.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 10
-
Peter Linzenkirchner commented 05/14/20, 10:11
-
Oliver Hader commented and changed status
NewNeeds Feedback 05/14/20, 11:09Thanks for your report and feedback. Does it mean this issue can be closed or are there further problems?
In case there are still problems, please post the relevant parts of your route enhancer configuration. Thx -
Oliver Hader changed category 05/14/20, 11:09
-
Oliver Hader changed target version 05/14/20, 11:23
-
Peter Linzenkirchner commented 05/14/20, 11:26
There is the problem left, that noCache=“1” results in a messed up URL.
The route enhancer config:
routeEnhancers: NoCacheHandling: type: Simple routePath: '/{no_cache}' requirements: no_cache: '.*' aspects: no_cache: type: StaticValueMapper map: nc: 1 -
Oliver Hader changed target version 05/18/20, 17:48
-
Benni Mack commented 06/03/20, 16:24
Peter Linzenkirchner wrote:
> There is the problem left, that noCache=“1” results in a messed up URL.Hey Peter,
I actually wrote a blog post about not using no_cache. As it actually builds up the same content with a different URL, you will have duplicated content for SEO reasons, so I would refrain for putting this in the route path.
-
Peter Linzenkirchner commented 06/03/20, 17:35
Hi Benni,
thanks for your answer! I needed it for URLs to AJAX calls, so there was no risk of duplicate urls. But i really needed the content without cache because i needed life data. So i worked around with config.no_cache=1 – no big deal with ajax calls.
But i think the viewhelper should not deliver a destroyed url when noCache=“1” is added. I understand that this attribute normally is not usefull anymore, but then it should be ignored by the viewhelper or the viewhelper should throw an exception. It was a bit difficult to find the reason why the urls were so messy … :-)
-
Benni Mack commented 06/03/20, 20:47
Peter Linzenkirchner wrote:
> Hi Benni,
>
> thanks for your answer! I needed it for URLs to AJAX calls, so there was no risk of duplicate urls. But i really needed the content without cache because i needed life data. So i worked around with config.no_cache=1 – no big deal with ajax calls.
>
> But i think the viewhelper should not deliver a destroyed url when noCache=“1” is added. I understand that this attribute normally is not usefull anymore, but then it should be ignored by the viewhelper or the viewhelper should throw an exception. It was a bit difficult to find the reason why the urls were so messy … :-)Hey Peter,
yes. the underlying issue is that two RouteEnhancer were added and only the no_cache route enhancer worked as it messed up additional URLs.
-
Benni Mack commented and changed status
Needs FeedbackClosed 01/06/22, 09:35I’ll close this issue, and keep it is a reference for people who use the same argument in multiple enhancers.
correction:
i made a mistake with the arguments – when i delete noCache=“1” the viewhelper works correctly with all arguments. Sorry.