Closed (fixed)
Project:
Configuration installer
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2018 at 17:05 UTC
Updated:
22 Sep 2018 at 08:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
balazswmann commentedThe problem is caused by composer based projects. If Drush is installed with composer it will be placed into the vendor directory somewhere. Now, the
class_exists('\Drush\Drush')check is not suitable in these cases because the autoloader will load the class anyway even if there is no Drush context (the site is being installed through the UI).The solution is to check the Drush context first (with
function_exists('drush_get_option')) and then use\Drush\Utils\StringUtils::generatePassword()ordrush_generate_password()according to the specific Drush version.Comment #3
balazswmann commentedComment #4
balazswmann commentedBy the way, this bug affects not just UI installation but automated testing also. Integration tests which rely on config_installer get stuck in an infinite loop due to the runtime exception.
Comment #5
balazswmann commentedComment #6
balsamaThanks! I think we also need an default for the name, pass, and email in case Drush isn't around. This patch just adds that.
Comment #7
alexpott@balsama nah we don;'t need the defaults this is about filing in info from drush.
Comment #8
alexpottThe drush 9 version also need to use
drush_get_option('account-pass',too in-case the user has provided one on the command line.Comment #9
alexpottLike so
Comment #10
alexpott