Tom Select Widget not playing well with views_data_export

Created on 17 January 2025, 3 months ago

I have a view display with a csv export link provided by the views_data_export module and when I have applied a filter using the tomselect widget take over of the multiselect I get this error:

The website encountered an unexpected error. Try again later.<br><br><em class="placeholder">TypeError</em>: Drupal\Core\Entity\Element\EntityAutocomplete::Drupal\Core\Entity\Element\{closure}(): Argument #1 ($item) must be of type array, string given in <em class="placeholder">Drupal\Core\Entity\Element\EntityAutocomplete::Drupal\Core\Entity\Element\{closure}()</em> (line <em class="placeholder">126</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php</em>). <pre class="backtrace">array_map(Object, Array) (Line: 126)
Drupal\Core\Entity\Element\EntityAutocomplete::valueCallback(Array, Array, Object)
call_user_func_array(Array, Array) (Line: 1259)
Drupal\Core\Form\FormBuilder-&gt;handleInputElement(&#039;views_exposed_form&#039;, Array, Object) (Line: 999)
Drupal\Core\Form\FormBuilder-&gt;doBuildForm(&#039;views_exposed_form&#039;, Array, Object) (Line: 1069)
Drupal\Core\Form\FormBuilder-&gt;doBuildForm(&#039;views_exposed_form&#039;, Array, Object) (Line: 579)
Drupal\Core\Form\FormBuilder-&gt;processForm(&#039;views_exposed_form&#039;, Array, Object) (Line: 326)
Drupal\Core\Form\FormBuilder-&gt;buildForm(&#039;\Drupal\views\Form\ViewsExposedForm&#039;, Object) (Line: 134)
Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase-&gt;renderExposedForm() (Line: 1298)
Drupal\views\ViewExecutable-&gt;build() (Line: 75)
Drupal\views_data_export\Plugin\views\display\DataExport::buildBatch(Object, Array) (Line: 53)
Drupal\views_data_export\Plugin\views\display\DataExport::buildResponse(&#039;program_clients_by_waitlist_no_search_api&#039;, &#039;data_export_1&#039;, Array) (Line: 56)
Drupal\views\Routing\ViewPageController-&gt;handle(&#039;program_clients_by_waitlist_no_search_api&#039;, &#039;data_export_1&#039;, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength-&gt;handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength-&gt;handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024