Bug #86990
closedf:uri.action -> absolute not working
0%
Description
f:uri.action does not add baseUrl to link when adding absolute:TRUE
Files
Updated by Thomas Anders almost 6 years ago
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.
Updated by Guido Schmechel over 5 years ago
Does is it work with absolute:'true' for you?
Updated by Stefan Völker about 5 years ago
- PHP Version set to 7.2
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 ?
Updated by Thomas Löffler almost 5 years ago
Works for me. Seems that there is no Site configured in Site Management?
Updated by Chris Wiesenekker almost 5 years ago
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?
Updated by Patryk Ostrowski almost 5 years ago
- File Selection_242.png Selection_242.png added
- File Selection_243.png Selection_243.png added
You need just to set correct entry point in site configuration and this solve that issue. Set it like here:
I think there is nothing more to add and we can close this issue.
Updated by Benni Mack almost 5 years ago
- Status changed from New to Closed
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.