Task #8491

link.action and uri.action differ in absolute argument

Added by Bastian Waidelich over 11 years ago. Updated almost 10 years ago.

Needs Feedback
Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
Has patch:


In r3548 the "absolute" argument of the link.action ViewHelper has been removed with following comment:
"[~TASK][~API] Fluid (ViewHelper): The ActionViewhelper now produces only absolute URIs. The argument "absolute" is now obsolete."

I don't understand why this would make sense.. And if it does, shouldn't the uri.action ViewHelper be changed accordingly?


Updated by Sebastian Kurfuerst over 11 years ago

added Robert and Karsten as watchers, so they get notified and can comment :)


Updated by Karsten Dambekalns almost 10 years ago

  • Subject changed from ActionLink ViewHelper only generates absolute links since r3548 to link.action and uri.action differ in absolute argument
  • Category set to ViewHelpers
  • Assignee set to Karsten Dambekalns
  • Priority changed from -- undefined -- to Should have
  • Has patch set to No

I just asked Robert about this and he cannot remember anything :)

I am not sure about the usefulness of relative URLs here, but I doubt the inconsistency introduced should stay as it is…

Does anyone have an opinion on this?


Updated by Bastian Waidelich almost 10 years ago

Karsten Dambekalns wrote:

Does anyone have an opinion on this?

I still have the same one as "over 1 year ago" - doesn't happen too often ;)
For URIs you usually set the absolute argument more often (in E-Mails, JavaScript, ...) but IMO this should be in sync with link.uri anyways (and for links, creating relative URIs by default makes absolute sense)


Updated by Adrian Föder almost 10 years ago

I have an opinion to everything. :)

Well, I feel uncomfortable with only-absolute URLs at all, although I can't reason this properly. So that's only IMHO.

Definitely the behavior of both should equal; couldn't even one extend the other? The URL handling and their options are and must be always equal together, so maybe it's possible to let the TagViewHelper (link) extend the other one...? Btw that's maybe beyond scope, but you asked ;-)


Updated by Adrian Föder almost 10 years ago

ah, now I understand; so, the default, usual behavior is/was to have absolute URLs when using URI, and relative ones when using LINK? OK, that makes sense for the reason Karsten mentioned, but I'd still like to keep the possibility to control this: sometimes for example I need to store an internal action URI to a data- attribute or even to <form action=""> we all know.

Conclusion: at least for JavaScript and AJAX tricks it's useful to have the uri.action output still relative.


Updated by Bastian Waidelich almost 10 years ago

Ok, there was some confusion. I'll try to recap:

uri.action and link.action both used to have an argument absolute that defaults to FALSE.
That has been changed for link.action: The argument has been removed completely and links are now always absolute.
That does not make sense to me. We could change the default to be TRUE but I would vote against that too as relative links should be used by default IMO (you have to take care of the base tag and so, but that's another issue).

Re: Tag-based ViewHelper extending other ViewHelpers. That would be nice, but it's currently not possible because PHP only allows one parent which is "AbstractTagBasedViewHelper" for Tag-VH. But it will be possible with mixins (or even with traits in 5.4)

Also available in: Atom PDF