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.
Problem/Motivation
When I wrote #2787255: Provide a views filter for administrative areas, I didn't know of a simple, safe, clean way to limit the available choices in the 'Country contextual filter' selector if you pick 'The value of a contextual filter' for the 'Country source'. Currently, it just shows you all the contextual filters on the view.
Proposed resolution
Limit the choices for 'Country contextual filter' to only let you pick something pointing to a country.
Remaining tasks
- Figure out a clean way to do this.
- Implement it.
- Test. (@see #3087833: Add FunctionalJavascript tests for Views UI parts of views plugins)
- Review/RTBC.
- Commit.
User interface changes
Choices for the 'Country contextual filter' setting will only let you pick something pointing to a country.
API changes
Hopefully none.
Data model changes
None.
Release notes snippet
Nah.
Comments
Comment #3
dwwI updated the @todo comment about this to add a @see pointing here. Progress! ;)
Comment #4
dwwNo idea why I called this 'Major'. Sorry about that.
Comment #5
Chris Matthews CreditAttribution: Chris Matthews commentedComment #6
dwwSure, we can call this something to target for 8.x-1.8, but let's not lose the association with the original parent issue #2787255: Provide a views filter for administrative areas. Restoring that (now calling it related, not the parent).
Meanwhile, I'm still soliciting feedback on the cleanest way to actually do this. Any ideas are most welcome. ;)
Thanks,
-Derek