Issue Bug Closed

#86990f:uri.action -> absolute not working

Martin Weymayer 11/24/18, 13:03 updated 01/10/20, 10:08

Description

f:uri.action does not add baseUrl to link when adding absolute:TRUE

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 2

History 8

  1. Riccardo De Contardi changed category 11/26/18, 11:53

  2. Thomas Anders commented 02/11/19, 08:30

    Same here.

    This:

    {f:uri.action(action: 'show', controller: 'Event', pageUid: settings.detailPid, arguments: '{event: eventItem}')}

    Creates a relative URL like

    /?tx_myext_events%5Baction%5D=show&tx_myext_events%5Bcontroller%5D=Event&tx_myext_events%5Bevent%5D=10&cHash=f3702d971c85744fa4ce8416a43c4665

    It is missing the whole URL part.
    My workaround is a f:link.typolink with the f:uri.action as parameter.

    {f:uri.typolink(parameter: '{f:uri.action(action: \'show\', controller: \'Event\', pageUid: settings.detailPid, arguments: \'{event: eventItem}\')}')}

    This works, but f:uri.action should also work on its own, especially to make quote masking unnecessary.

  3. Guido Schmechel commented 04/13/19, 23:45

    Does is it work with absolute:‘true’ for you?

  4. Stefan Völker commented and changed PHP Version 7.2 10/07/19, 12:08

    Same here – it also doesn’t work with “absolute=‘true’”, see:
    {f:uri.action(extensionName: ‘extname’, controller: ‘Event’, action:‘show’, absolute: ‘true’, arguments:’{event:event}’,pageUid:’{settings.detailPid}’,pluginName: ‘Eventdetails’)}

    Anyone ?

  5. Thomas Löffler commented 12/19/19, 15:31

    Works for me. Seems that there is no Site configured in Site Management?

  6. Chris Wiesenekker commented 12/20/19, 10:37

    Creating a site doesn’t fix it by default because the content of the base matters for the functions uri.typolink and uri.action

    Possible fix?
    base: ‘https://%env(HTTP_HOST)%/’ in the site managemant module?

  7. Patryk Ostrowski commented and changed attached Selection_242.png attached Selection_243.png 01/07/20, 15:26

    You need just to set correct entry point in site configuration and this solve that issue. Set it like here:

    Selection_242.png

    I think there is nothing more to add and we can close this issue.

  8. Benni Mack commented and changed status New Closed 01/10/20, 10:08

    Creating an absolute URL with site handling, where your “base” setting is just “/” would make TYPO3 have to “guess” again the URL, which would result in non-predictable results (as was done in the past).

    It is highly recommended to use an absolute URL as base and using base variants for all the various domains that are in place to achieve this goal.

    If you feel there is still something wrong, let me know, and I’ll re-open the ticket.