Error: Parameter "view_args" for route "viewsfilters.autocomplete" must match "[^/]++" ("" given) to generate a corresponding URL

Created on 28 April 2017, about 7 years ago
Updated 12 March 2024, 4 months ago

Hi,

I am using better exposed filters on a BLOCK view, AJAX and I want to filter by title and whenever I enable autocomplete on the title field I get "The website encountered an unexpected error. Please try again later."

Interestingly everything works fine in View Preview mode!

Watchdog has 2 assoiciated entries:

1.

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'element_validate_integer' not found or invalid function name in Drupal\Core\Form\FormValidator->doValidateForm() (line 277 of /core/lib/Drupal/Core/Form/FormValidator.php) #0 /core/includes/bootstrap.inc(552): _drupal_error_handler_real(2, 'call_user_func_...', '/c...', 277, Array) #1 [internal function]: _drupal_error_handler(2, 'call_user_func_...', '/c...', 277, Array) #2 /core/lib/Drupal/Core/Form/FormValidator.php(277): call_user_func_array('element_validat...', Array) #3 /core/lib/Drupal/Core/Form/FormValidator.php(235): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState)) #4 /core/lib/Drupal/Core/Form/FormValidator.php(235): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState)) #5 /core/lib/Drupal/Core/Form/FormValidator.php(235): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState)) #6 /core/lib/Drupal/Core/Form/FormValidator.php(119): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'views_ui_config...') #7 /core/lib/Drupal/Core/Form/FormBuilder.php(571): Drupal\Core\Form\FormValidator->validateForm('views_ui_config...', Array, Object(Drupal\Core\Form\FormState)) #8 /core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('views_ui_config...', Array, Object(Drupal\Core\Form\FormState)) #9 /core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(212): Drupal\Core\Form\FormBuilder->buildForm('views_ui_config...', Object(Drupal\Core\Form\FormState)) #10 /core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\views_ui\Form\Ajax\ViewsFormBase->Drupal\views_ui\Form\Ajax\{closure}() #11 /core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(214): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(123): Drupal\views_ui\Form\Ajax\ViewsFormBase->ajaxFormWrapper('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState)) #13 /core/modules/views_ui/src/Form/Ajax/ConfigHandler.php(37): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'block_1', 'ajax') #14 [internal function]: Drupal\views_ui\Form\Ajax\ConfigHandler->getForm(Object(Drupal\views_ui\ViewUI), 'block_1', 'ajax', 'filter', 'title') #15 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #16 /core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #17 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #18 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #19 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #20 /vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #21 /vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #22 /core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #31 {main}.

2.

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "view_args" for route "viewsfilters.autocomplete" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 202 of /core/lib/Drupal/Core/Routing/UrlGenerator.php).

I have to say that autocomplete does work with a taxonomy term filter on the same view. Problems seem to be with the title field.
I tried to use the standard title field and one that stripped all links and html. Same error.

What else can I try?
Thanks

πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria maxilein

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea

    i can't replicate this ...i tried (even) with ajax enabled and Paragraphs ... no errors

    of course with the "current" Drupal (10.2) and latest dev version of the module.

    so I\m closing for now ... as clean-up queue.
    Please feel free to re-open if "it's the case".

    Also added the Drupal core issue mentioned here ... which "sounds" like duplicate.

Production build 0.69.0 2024