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

BLT should never alter settings.php and should *only* use pre-settings-php hooks #1180

Closed
seanhamlin opened this issue Mar 13, 2017 · 4 comments
Assignees
Labels
Support A support request

Comments

@seanhamlin
Copy link

seanhamlin commented Mar 13, 2017

My system information:

  • Operating system type: ubuntu
  • Operating system version: precise
  • BLT version: 8.6.15

I noticed that BLT likes to inject it's settings at the very end of the docroot/sites/g/settings.php file:

$ tail docroot/sites/g/settings.php

// Include custom settings.php code from factory-hooks/post-settings-php.
if (function_exists('acsf_hooks_includes')) {
  foreach (acsf_hooks_includes('post-settings-php') as $post_hook) {
    include $post_hook;
  }
}
require DRUPAL_ROOT . "/../vendor/acquia/blt/settings/blt.settings.php";

I believe it would be nicer if BLT was to stick to using just the pre-settings-php hook. Unsure why modifying this file was done, but it clearly is in error. Site Factory checks the integrity of these files, and will fail if modified.

@seanhamlin seanhamlin changed the title BLT hooks should fire prior to "post-settings-php" hooks in Site Factory BLT settings.php include should fire prior to "post-settings-php" hooks in Site Factory Mar 13, 2017
@seanhamlin seanhamlin changed the title BLT settings.php include should fire prior to "post-settings-php" hooks in Site Factory BLT should never alter settings.php and should *only* use pre-settings-php hooks Mar 13, 2017
@grasmash
Copy link
Contributor

@seanhamlin my understanding is that ACSF no longer restricts modifications to settings.php. I worked with @nikgregory to effect this change. Are you encountering an error? If so, what version of the ACSF module are you using?

@grasmash
Copy link
Contributor

Also, you're free to use the include however you'd like. If you don't want it, just comment it out.

@grasmash grasmash added the Support A support request label Mar 13, 2017
@seanhamlin
Copy link
Author

From talking with Site Factory engineering, the file docroot/sites/g/settings.php is wholey owned by ACSF, any modifications will result in Site Factory being unhappy. Modifications to docroot/sites/default/settings.php are fine though.

@seanhamlin
Copy link
Author

Thanks @grasmash !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

No branches or pull requests

2 participants