Problem/Motivation
When creating an endpoint, I run into the following error message:
Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "search_api_endpoint" for route "search_api_decoupled.filter_library" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (Line 209 in var/www/html/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).
Steps to reproduce
I used this module already in several projects, this is the first time I get this bug, no matter what I do.
I assume it has something to do with the used versions of Drupal / PHP.
The following versions are in use:
- PHP 8.2
- Drupal 10.2
- Search API Decoupled 1.0.0-alpha40
The error occurs on endpoint creation.
Proposed resolution
I show $form['filters_wrapper']['add_filter'] only, if the endpoint already exists. Otherwise $this->entity is not there. Patch is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| search_api_endpoint_20251106-1345.patch | 1.6 KB | fabianrichter |
Issue fork search_api_decoupled-3556434
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
a.dmitriiev commentedThank you for reporting the bug. The filters feature was indeed recently added. The patch looks reasonable to me. I will add it now and release a new version as it is not possible to add new endpoints at the moment.
Comment #5
a.dmitriiev commentedAdded the code to MR and merged. This will be part of alpha41 release.
Comment #7
fabianrichter commentedThank you!