Problem/Motivation
This issue seems so glaring, that I think I must be doing something wrong. I set up a views reference field, with an exposed filter. But when I try to add the view on an entity, it doesn't seem to save the override value I put there.
Steps to reproduce
- Install/enable viewsreference and this module.
- Create a content type with a term reference field.
- Create two nodes tagged by different terms (let's call it "term 1" and "term 2").
- Create a view that shows content of this type, with an exposed filter for the term reference field you used. Add a Block display for the view.
- Create a content type with a Views reference field. Enable the field setting to use the "Exposed Filters - editor view" option.
- Create a node of that content type with the views reference field.
- Select the view created above, and the block display.
- Save.
- At this point, viewing the node should show the view embed with both nodes referencing term 1 and 2.
- Edit the node again, this time it will load the exposed filters from the view. Add a filter value, say term 2, and save.
- Viewing the saved node still shows both term 1 and 2 nodes.
- Now try to edit the views reference node again, the view field's settings don't seem to have saved the exposed filter value you entered.
Am I missing something? This seems like the basic usage of this module. I've tried this on an existing project, and on a from sandbox scratch site I use for testing things outside of a complex project context.
Edit: Just adding supplemental info. This is what the field DB record looks like in both the field and field revision tables:
a:7:{s:6:"header";N;s:6:"offset";N;s:5:"title";N;s:5:"pager";N;s:5:"limit";N;s:8:"argument";N;s:15:"exposed_filters";N;}
Also, I can add a default value it's filtering by in the view, but that only persists, and I can't override that value either.
Comments
Comment #2
bburgComment #3
lalop commentedI have the same issue with drupal 10.5
Comment #4
lalop commentedIn fact the issue come from better expose filter in my case.
Comment #5
pheudo commentedHi @bburg,
I tried to replicate your steps, but I didn't encounter your problem, also with the latest version of viewsreference and Drupal.
In fact, the specific scenario you mentioned was also tested in a PHPUnit test.
Could you please give me more details?
Comment #6
nilsson commentedHello,
Having the same issue, I tried to strip down the views and @lalop has it right : problem has to do with Better Exposed Filters. In my case, the Checkbox / Radio option on any field results in unsaved options.
I don't know if it's a BEF issue or a viewsreference_filter issue (or both ?) : the error is silent.