Problem/Motivation
I was messing around with Drupal 9 to optimize our configuration management workflow when I stumbled upon this module, so I wanted to give it a try. I tried it out on a local setup with the Umami profile.
Visiting /admin/config/development/configuration/full/update gives me this error though :
The website encountered an unexpected error. Please try again later.
Error: Unsupported operand types in Drupal\Core\Render\Element\Select::processSelect() (line 152 of core/lib/Drupal/Core/Render/Element/Select.php).
Drupal\Core\Render\Element\Select::processSelect(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 1008)
Drupal\Core\Form\FormBuilder->doBuildForm('config_update_form', Array, Object) (Line: 1071)
Drupal\Core\Form\FormBuilder->doBuildForm('config_update_form', Array, Object) (Line: 575)
Drupal\Core\Form\FormBuilder->processForm('config_update_form', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
A clean Drupal 9 install with drupal/recommended-project, and a drush install of the Umami profile. The module was added with composer and enabled with Drush. When you visit the configuration page of the module, you get this error.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
codemannComment #3
duneblSame error on Drupal 9.1.2.
I set it as Major because the module is simply unusable on D9
Comment #4
duneblLooks like it is the
#optionin the below code which is not working:modules/contrib/config_direct_save/src/Form/UpdateConfigurationForm.php
I am not sure, but maybe this should be replaced by:
'#options' => [Settings::get('config_sync_directory')],With an added use clause at the top of the file:
Comment #5
saitanay commentedStumbled into the same issue. #4 works.
Comment #6
mimran commentedApplied #4 and endup with following error when tryto update configurations
Comment #7
guilhermevp commentedWas able to reproduce the error and patch#4 works as intended.
Comment #8
guilhermevp commentedOps.
Comment #9
mimran commentedComment #10
mimran commentedAdded a new fix
Comment #11
mimran commentedComment #13
matio89 commentedHi!
The last patch is working fine with D8/D9 versions.
Thanks!
Comment #14
matio89 commented