Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove CRAFT_WEB_URL, fixes #5665 #5668

Merged
merged 2 commits into from Jan 26, 2024

Conversation

timkelty
Copy link
Contributor

@timkelty timkelty commented Jan 1, 2024

The Issue

The CRAFT_WEB_URL env variable is not necessary for a Craft project, and prevents multi-site features from working.

How This PR Solves The Issue

Does not manage CRAFT_WEB_URL.

It also removes the comment about backward compatibility, as it isn't quite true. While PRIMARY_SITE_URL isn't an "official" var that Craft uses, it is a de-facto standard, as Craft's installer script will attempt to set it, and it is helpful to have the primary site set to reference in your config.

Manual Testing Instructions

Start a craftcms ddev project:

ddev config --project-type=craftcms --docroot=web --create-docroot
touch .env
ddev start

Ensure CRAFT_WEB_URL was not written to .env (command should have no output):

cat .env | grep "CRAFT_WEB_URL="

Automated Testing Overview

Related Issue Link(s)

Fixes #5665

Release/Deployment Notes

@timkelty timkelty requested a review from a team as a code owner January 1, 2024 00:52
@github-actions github-actions bot added the bugfix label Jan 1, 2024
Copy link

github-actions bot commented Jan 1, 2024

@rfay
Copy link
Member

rfay commented Jan 2, 2024

If CRAFT_WEB_URL isn't necessary for an ordinary project then I'm all in favor of not having it added to .env.

@rfay rfay changed the title fix: remove CRAFT_WEB_URL fix: remove CRAFT_WEB_URL, fixes #5665 Jan 2, 2024
@rfay
Copy link
Member

rfay commented Jan 2, 2024

Please add manual testing instructions (and do them) thanks!

@timkelty
Copy link
Contributor Author

timkelty commented Jan 3, 2024

@rfay added manual testing instructions

Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me.

And I see that CraftCMS uses PRIMARY_SITE_URL since 2020 craftcms/cms@7e18bc5

@stasadev stasadev merged commit 6be1176 into ddev:master Jan 26, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DDEV should not manage CRAFT_WEB_URL in .env (Craft CMS)
3 participants