Bug #96627
closedUsing env variable in site config does not really works
0%
Description
If I set
rootPageId:%env(ROOT_PAGE_ID)%
BE breaks
Updated by Oliver Bartsch almost 3 years ago
- Status changed from New to Needs Feedback
Hi, since %
is a special character, you have to quote it. See the examples in the docs: https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/SiteHandling/UsingEnvVars.html#using-environment-variables-in-site-configuration.
In your case this should be: rootPageId: '%env(ROOT_PAGE_ID)%'
Does this fix your issue?
Updated by Siva Prasad almost 3 years ago
Oliver Bartsch wrote in #note-1:
Hi, since
%
is a special character, you have to quote it. See the examples in the docs: https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/SiteHandling/UsingEnvVars.html#using-environment-variables-in-site-configuration.In your case this should be:
rootPageId: '%env(ROOT_PAGE_ID)%'
Does this fix your issue?
Hello Oliver,
Thanks for the feedback. I tried both options, I mean with and without quotes. But I will reconfirm this once again and will update here. Thanks for the feedback.
Updated by Siva Prasad almost 3 years ago
This ticket can be closed as this was an issue from my side. I missed quotes
Updated by Oliver Bartsch almost 3 years ago
- Status changed from Needs Feedback to Closed
Alright, thanks for the feedback. Closed as requested.