Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce
- create a view (block, not a page)
- add exposed filters
- disable ajax
filters wont work.
We added the module "views block filter block"
https://www.drupal.org/project/views_block_filter_block So we could place the exposed filters also in a block.
The filters return this error now:
PHP message: Uncaught PHP Exception InvalidArgumentException: "You cannot create a URL to a display without routes." at /data/web/radio2/htdocs/web/core/modules/views/src/ViewExecutable.php line 1926
Comment | File | Size | Author |
---|---|---|---|
#15 | better_exposed_filters-2859094-15.patch | 2.97 KB | StijnStroobants |
#7 | filters_not_showing_view_block-2859094-7.patch | 3.03 KB | jover |
Comments
Comment #2
wouters_f CreditAttribution: wouters_f for VRT commentedAny advice on the fix in the patch is more than welcome.
Comment #3
osman(almost) same here.
1. Create a views block,
2. expose terms via BEF to render them as links
3. Drupal warns `Exposed filters in block displays require "Use AJAX" to be set to work correctly.`
4. enable AJAX for that display
5. save
Upon rebuilding the cache and refreshing the page displaying that block view, I get the following error message.
btw, I tried both 8.x-3.0-alpha2 and the dev snapshot (commit ID:`5888e68b6c6c7147a9e7b90a71cf56d35edc4466`), ended up with the same error.
Comment #4
osmanSeems like the 8th branch still inherits quite a bit of 7.x API.
A quick look into `theme_select_as_links()` shows usage of `request_uri()`, `filter_xss()`, `drupal_html_id()`, `theme()`, etc. These functions are not available in 8.x, hence the errors.
If you need to use the link formatter for the exposed filters, I suggest wait for an update, or find an alternate solution, checkboxes seems to be working.
Comment #5
FiNeX CreditAttribution: FiNeX as a volunteer commentedI confirm that checkboxes and radio buttons are working, instead links returns a WSOD with the following error (I'm not using views_block_filter_block module):
Uncaught PHP Exception InvalidArgumentException: "You cannot create a URL to a display without routes.
Comment #6
Mschudders CreditAttribution: Mschudders as a volunteer commentedI can confirm that patch #2 is working.
However if you have additional exposed filters like a "title" it doesn't work.
Rephrased, they do not work together.
Comment #7
joverNew patch available, because patch #2 was not compatible anymore with 8.x-3.x
Comment #8
maaty388 CreditAttribution: maaty388 commentedOk, thank you for patch #7 works for me.
Comment #9
ryross CreditAttribution: ryross commented#7 also works for me
Comment #11
mikeker CreditAttribution: mikeker commentedThank you, @wouters_f and @jover, for the patch and reroll/cleanup! Apologies for the delay getting to this issue.
Comment #13
zenimagine CreditAttribution: zenimagine commentedI tested and the patch does not work for drupal 8.4
Comment #14
sinn CreditAttribution: sinn at Adyax commentedYes, doesn't work with Drupal 8.4.3
Comment #15
StijnStroobantsPatch was not succesfully applying. I think because of the wrong line-numbers.
I had to apply the changes manually.
Rerolled the patch and is working for me with Drupal 8.4.3 and Better Exposed Filters 8.x-3.0-alpha3