Project

General

Profile

Actions

Bug #96627

closed

Using env variable in site config does not really works

Added by Siva Prasad almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-01-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If I set

rootPageId:%env(ROOT_PAGE_ID)%

BE breaks
Actions #1

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?

Actions #2

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.

Actions #3

Updated by Siva Prasad almost 3 years ago

This ticket can be closed as this was an issue from my side. I missed quotes

Actions #4

Updated by Oliver Bartsch almost 3 years ago

  • Status changed from Needs Feedback to Closed

Alright, thanks for the feedback. Closed as requested.

Actions

Also available in: Atom PDF