Skip to content

[6.x]: \Data\Site::getConfig do not parse baseUrl #19092

@Anubarak

Description

@Anubarak

What happened?

Description

Currently when storing sites to the project config, it will automatically parse the URL

'baseUrl' => $this->baseUrl ?: null,

When saving a site with a base URL of $APP_URL it will be parsed as https://example.com so the URL will end up in the project config.

Would be great if you could change that to

'baseUrl' => $this->getBaseUrl(false) ?: null,

so the env value and not the parsed value will be stored.`

Steps to reproduce

  1. save a site with an env value as base URL

Expected behavior

The env value should be stored

Actual behavior

the env value is parsed and the parsed value is stored

Craft CMS version

6.0.0-alpha6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions