-
Notifications
You must be signed in to change notification settings - Fork 396
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
Don't copy default settings files that are not needed #4156
Comments
I would consider it best practice to leave the default settings files in place and copy them to their "active" versions, rather than renaming them. One practical reason to leave those in place is that it's more obvious when they change, so that you can take a diff and apply relevant changes to your own active versions. Does leaving default.settings.php and default.global.settings.php in place actually cause any harm, besides a marginal amount of clutter in the directory? Note that BLT isn't the only way these files can come to exist, I believe Composer Scaffold will also recreate default.settings.php if it doesn't exist, at least by default. @mikemadison13 do you have any preference on this, as someone who deals with these files in production a lot more than I do? |
If that is the recommendation, then wording in the file should be changed:
|
Makes sense, I updated the instructions. Thanks for the report! |
It would have been nice to remove the unnecessary warnings that I included in my PR. |
That's fine, I merged and backported it. |
Is your feature request related to a problem? Please describe.
I'm always frustrated when I add a new multisite and the
default.global.settings.php
(that I have renamed toglobal.settings.php
as per instructions) has reappeared in the site/settings directory.I get notifications for each existing multisite that
No /var/www/docroot/sites/default/default.settings.php file found.
When the settings.php file for the site already exists when a new site is added, it shouldn't try to add adefault.settings.php
file.Describe the solution you'd like
Check for the existence of the
sites/settings/global.settings.php
file and only copy the default file if it does not exist.It should check if the
site/settings.php
file exists and only issue the warning if it does not.PR forthcoming.
The text was updated successfully, but these errors were encountered: