Problem/Motivation

I'm getting two webform related errors I can't find more information about on Google.

The error occurs when I:

- select a single image select image
- select multiple image select images

(allowed number of values single or unlimited)

And click on the next page button.

Screenshot of webform view screen: http://pix.toile-libre.org/upload/original/1496239032.png
Screenshot of webform image select settings: http://pix.toile-libre.org/upload/original/1496239100.png

Warning: array_filter() expects parameter 1 to be array, string given in Drupal\webform\Plugin\WebformElement\OptionsBase::validateMultipleOptions() (line 295 of modules/contrib/webform/src/Plugin/WebformElement/OptionsBase.php).

Drupal\webform\Plugin\WebformElement\OptionsBase::validateMultipleOptions(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 1309)
Drupal\webform\WebformSubmissionForm::hiddenElementValidate(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 277)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'webform_submission_creditcard_helper_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('webform_submission_creditcard_helper_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_creditcard_helper_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('webform_submission_creditcard_helper_form', Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'default') (Line: 823)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 82)
Drupal\webform\Controller\WebformController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning: array_values() expects parameter 1 to be array, null given in Drupal\webform\Plugin\WebformElement\OptionsBase::validateMultipleOptions() (line 296 of modules/contrib/webform/src/Plugin/WebformElement/OptionsBase.php).

Drupal\webform\Plugin\WebformElement\OptionsBase::validateMultipleOptions(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 1309)
Drupal\webform\WebformSubmissionForm::hiddenElementValidate(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 277)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 235)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'webform_submission_creditcard_helper_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('webform_submission_creditcard_helper_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_creditcard_helper_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('webform_submission_creditcard_helper_form', Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'default') (Line: 823)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 82)
Drupal\webform\Controller\WebformController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Hyperfocused created an issue. See original summary.

Hyperfocused’s picture

Issue summary: View changes
jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
5.55 KB

I can't duplicate the issue using the attached example form.

Hyperfocused’s picture

FileSize
1.31 KB

Thanks for your quick help!

I just tried it again on a fresh site, latest Drupal, could duplicate it with attached code.

Proof: http://pix.toile-libre.org/upload/original/1496250301.png

Hyperfocused’s picture

FileSize
3.72 KB

Full configuration export attached.

Hyperfocused’s picture

I could replicate the error with your example, maybe it's because of my Drupal installation? Almost nothing going on in this installation, maybe I need to try on a completely fresh Drupal installation?

Hyperfocused’s picture

Should I send you the full Drupal installation (files + db) for inspection? Where should I send it to? It's bundled with a docker-compose.yml file, you'll just need to run docker-compose up to see my environment.

jrockowitz’s picture

Are you using the latest dev release?

Can you replicate the issue via https://simplytest.me/project/webform?

Hyperfocused’s picture

The latest version appears to have fixed it, thanks! I ran composer update yesterday but it seems it didn't update to 5.0.0-beta13.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)