contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 104 forks source link

Allow for drush site:install config overrides #362

Closed GMSteuart closed 5 years ago

GMSteuart commented 5 years ago

The current submitForm method in the ModuleConfigureForm.php file does not allow for drush cli overrides. Issue #211 was originally created a solution found, but since then the code has been updated.

Previously:

$ drush site:install contenta_jsonapi install_configure_form.include_recipes_magazin=0 ...

Would disable installation of the default content. The form data has been abstracted from the form array that drush limits itself to overriding.

Changing to the code to be merged into the forms key instead of args:0 fixes this problem.

$build_info = $form_state->getBuildInfo();

$install_state = $build_info['forms'];

$install_state['contenta_jsonapi_additional_modules'] = $install_modules;
$install_state['form_state_values'] = $form_state->getValues();

$build_info['forms'] = $install_state;
e0ipso commented 5 years ago

@GMSteuart thanks for the report. Any chances you can submit a PR with the fix?

GMSteuart commented 5 years ago

@e0ipso Yes. I will do some testing later this evening/weekend and finalize a PR as the .profile file also needs to be updated and I want to ensure nothing breaks.

e0ipso commented 5 years ago

This was fixed.