Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Update notifications not disabled during Drupal 8.3.x installation #1353

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

danepowell
Copy link
Contributor

BLT disables update notifications during install time via a command-line argument to Drush. This is nice because it prevents Drupal from sending an email that can cause problems on systems without a local mail transport agent.

The problem is that Drupal changed the update notification configuration form in 8.3.0: http://cgit.drupalcode.org/drupal/commit/?h=8.3.x&id=b97e6a73ab0593efa99c84a36c635bbe3fe9f4e6

This caused this parameter to stop working, and for some users errors due to their system being unable to send the email.

This fixes it by adding the new parameter (leaving the old parameter for 8.2.x users shouldn't hurt anything).

I also considered making this a Phing property / variable to reduce duplication, let me know if you'd prefer that.

@geerlingguy
Copy link
Contributor

geerlingguy commented Apr 10, 2017

+1 also started getting the following in Travis CI builds:

Unable to send email. Contact the site administrator if the problem  [error]
persists.

...and as of a couple hours ago, it seems none of my Travis CI builds will pass anymore. I remember there was a quick workaround I could toss in my .travis.yml file, but I don't remember where I saw it.

@grasmash grasmash added the Enhancement A feature or feature request label Apr 10, 2017
@grasmash grasmash merged commit d973d17 into acquia:8.x Apr 10, 2017
Copy link

@dreamfony dreamfony left a comment

Choose a reason for hiding this comment

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

Two things are incorrect here. Value has to be NULL and you can not chain params with ;
Correct would be:

<param>"install_configure_form.update_status_module='array(FALSE,FALSE)'"</param>
<param>"install_configure_form.enable_update_status_module=NULL"</param>

Also it is not necessary to add enable_update_status_emails because update status module wont even do the check

@geerlingguy
Copy link
Contributor

If you need a quick hacky workaround for this problem in the Travis CI environment, stick the 'sendmail_path' line into your .travis.yml file as shown below:

before_install:
  # Disable xdebug.
  - phpenv config-rm xdebug.ini
  - echo 'sendmail_path = "/bin/true"' | sudo tee "/home/travis/.phpenv/versions/`php -i | grep "PHP Version" | head -n 1 | grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
  - composer self-update
  - composer validate --no-check-all --ansi
  - composer install

It basically tells any PHP process trying to send an email that the send was successful no matter what. Don't ever use this hack on a live site :)

@danepowell
Copy link
Contributor Author

danepowell commented Apr 11, 2017

@dreamfony I've tested this and the email sending was definitely disabled. I'm not sure how to reconcile that with your comment. It's possible I changed something else at the same time without realizing it, but I'm pretty sure that's not the case.

EDIT: I re-tested this and you're correct! Sorry about that. I have no idea what went wrong the first time I tested this. I'll submit a new PR with the correct fix.

@danepowell
Copy link
Contributor Author

@dreamfony thanks a lot for catching this, I think I have the correct fix in #1360

@danepowell danepowell deleted the feature/install-update-fix branch December 6, 2017 00:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement A feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants