Exposed form filter redirects to view page display

Created on 27 July 2022, almost 2 years ago
Updated 12 August 2023, 11 months ago

Problem/Motivation

When referencing a view with an exposed filter on a node page.
When the exposed form is submitted, it redirects to the view page display.

Steps to reproduce

1)On a node page, reference a view which has also a page display.
If the view has an exposed form, it redirects the user to the page display when the form is submitted.

If also a view is referenced with the page display, on the exposed form submission we are redirected to the view page.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡²πŸ‡ΊMauritius j.b

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.

  • πŸ‡³πŸ‡±Netherlands ricovandevin

    This is probably not related to Views Reference Field but to the way the core Views module handles URLs for view displays. It looks for the URL of the display. If the display does not have a URL itself it looks for the URL of the linked display. If no display is linked, it uses the URL of the first display in the view that does have a URL. And it ultimately false back to the current URL.

    You can fix this by settings a Link display of type Custom URL and a value of <current> (assuming you want the exposed filter to post to the current URL) on the display that generated the exposed filter block. You'll however need to use the patch from https://www.drupal.org/project/drupal/issues/1874838 ✨ Allow exposed blocks to use 'Link display' settings Needs work to make this work.

  • πŸ‡©πŸ‡ͺGermany AgathaCrystal Potsdam

    @ricovandevin: This works perfectly, thank you for the suggestion!

Production build 0.69.0 2024