Problem/Motivation
The dependent entity reference filter stops working when changing the filter identifier of the dependency, with ajax enabled.
For example:
In a view with the filter exposed "A" and "B". Filter "A" is a normal exposed filter and "B" is an entity reference filter. In this scenario, the filter "B" has "Arguments for the view" as the identifier of the filter "A".
While the filter "A" has its default identifier (string equal to its machine name) this combination works perfectly, but when customizing the identifier it stops working.
Steps to reproduce
- Create a content block in a view.
- Enable ajax
- Introduce a filter exposed in a dropdown, for example, referring to a taxonomy term and change the identifier string.
- Introduce a type filter (entityreference filter) and configure it. Including putting the filter add previously as "Arguments for the view".
- Run the view with the first filter change.
- Note that the entity reference filter is not reacting to the first filter update
Proposed resolution
From what I could see the ajax controller code doesn't handle the case when the identifier is different from the filter's machine name.
My suggestion is to identify, find the machine name of it and put it in a new variable, then change this in the necessary zones.
Remaining tasks
Validate the proposed resolution.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|
Issue fork entityreference_filter-3282226
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 #3
lolgm commentedComment #4
silverham commented[Edited: oops wrong issue]
Comment #5
silverham commentedComment #6
maximkashubaThe issue will be checked in 2.0.x branch.