#106117baseVariant base on applicationContext Development not used for absolute URI
Description
When having base: / in config.yaml and an additional baseVariant base: ‘https://dev.example.com’ on condition: ‘applicationContext == “Development”’ no absolute URI can be build, e.g. by fluid Uri.action.
Only when main base has been edited with DEV-Domain like this
base: 'https://dev.example.com'
baseVariants:
-
base: 'https://dev.example.com'
condition: 'applicationContext == "Development"'
the absolute URI is being build e.g. by fluid Uri.action.
Application Context setting has been established via .htaccess
# Rules to set ApplicationContext based on hostname
RewriteCond %{HTTP_HOST} ^dev\.example\.com/$
RewriteRule .? - [E=TYPO3_CONTEXT:Development]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule .? - [E=TYPO3_CONTEXT:Production]
This seems to be intended, as the description of entry point tells me
“Wenn es nur ein / ist, können Sie sich nicht darauf verlassen, dass TYPO3 die vollen URLs erzeugt.“
(If it’s just a /, you can’t rely on TYPO3 to generate the full URLs.)
This has been different in Typo3 11.5 and I’m wondering, for which purpose the baseVariants actualy are.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 11
-
Chris Müller changed Duplicates #106116 02/07/25, 18:06
-
Chris Müller changed status
NewClosed 02/07/25, 18:07 -
Chris Müller changed status
ClosedNew 02/07/25, 18:07 -
Chris Müller commented and changed status
NewClosed 02/07/25, 18:08 -
Chris Müller changed status
ClosedNew 02/07/25, 18:09 -
Chris Müller changed
Duplicates #10611602/07/25, 18:10 -
Chris Müller changed Duplicated by #106116 02/07/25, 18:11
-
Garvin Hicking commented and changed status
NewNeeds Feedback 02/07/25, 19:15Hm, I have this here working:
base: / baseVariants: - base: 'https://demo.ddev.site' condition: 'applicationContext matches "#^Development/Ddev#"' - base: 'https://stage.example.com' condition: 'applicationContext == "Production/Staging"' - base: 'https://www.example.com' condition: 'applicationContext == "Production/Production"'Maybe your TypoScript config is what’s interferring? Do you have
config.absRefPrefix = /set? -
Garvin Hicking commented 02/07/25, 19:17
(Also, ensure your TYPO3_CONTEXT really gets propagated – check with adminpanel or xdebug or a PHP header at the end of the middleware or within the settings.php)
-
Holger Drosdek commented 02/10/25, 12:04
Thanks for hints, you are completely right. We did a server update at the same time, the environment variables for TYPO3_CONTEXT is missing actualy. Bug report can be closed, no Typo3 bug!
-
Garvin Hicking commented and changed status
Needs FeedbackClosed 02/10/25, 16:43Great, thanks for getting back to it quickly.
Closing as requested :-)
It should also be possible to edit your issue later. No need to create a new issue.