With a taxonomy term view Exposed form in block has incorrect action URL /taxonomy/term/all, not taking into account term id and breaking filtering without AJAX / JS

Created on 8 October 2020, over 4 years ago
Updated 19 August 2023, over 1 year ago

Problem/Motivation

Exposed form in block not working with taxonomy term views when AJAX is disabled. When the exposed form is shown in a block it has incorrect action URL:
action="/en/taxonomy/term/%2A" or action="/en/taxonomy/term/all" instead of action="/en/taxonomy/term/1"

Steps to reproduce

Create a /taxonomy/term/% view, add some Filter criteria to it and the taxonomy Contextual filter.
Set Advanced > Exposed form > Exposed form in block to "Yes".
Go to /admin/structure/block and add the block to a region.
Open /taxonomy/term/1, check the action attribute of the form and try filtering.

Update

The code in ViewsExposedForm.php is being executed two times? I've added some debug prints and it's somehow getting a correct value first time, before any HTML output is formed. And then the same code gets executed when HTML for the block is being formed, this time getting incorrect value.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
ViewsΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ΊπŸ‡¦Ukraine int_ua

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.

Production build 0.71.5 2024