craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 635 forks source link

[5.x]: ENV not working anymore ($craft_env_name instead of value) #15662

Closed gettheflow closed 1 month ago

gettheflow commented 1 month ago

What happened?

Description

Since the update this morning was released, the env vars are not interpreted anymore.

Steps to reproduce

  1. update, and check i.E. the urls'

Expected behavior

Interpret the ENV Vars i.E. ($CRAFT_WEB_ROOT="https://myurl.com/" used to return https://myurl.com/)

Actual behavior

Passing out the variable name in lowercase letters: Now the same Variable used returns: not as expected the ENV Value, it returns $craft_web_root instead.

Craft CMS version

Craft Pro 5.4.0.1

PHP version

8.3.8

Operating system and version

Linux 6.10.0-linuxkit

Database type and version

MySQL 8.0.36

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

gettheflow commented 1 month ago

Both issues are conneted and it seems to work, but has some changes to consider: https://github.com/craftcms/cms/issues/15662

For the Base URL, I've now added two different vars (EN/DE) and only put the final URL-Variables in there. Before I had «$CRAFT_WEBSITE_URL/de and $CRAFT_WEBSITE_URL/en in there». This no longer works. This is a good change to avoid string parsing at this point.

So you can basically close them.