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.
The field for the facet URL name says ' A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores. '
Is there a reason this can't have hyphens, since other Drupal URLs and Views filter query parameter can contain them?
Comment | File | Size | Author |
---|---|---|---|
#11 | allow_hyphens_in_facet-2723365-11.patch | 3.01 KB | StryKaizer |
#11 | interdiff.txt | 647 bytes | StryKaizer |
#5 | allow_hyphens_in_facet-2723365-5.patch | 3.01 KB | borisson_ |
Comments
Comment #2
borisson_Oh no, that makes sense.
Comment #3
StryKaizerI used the same pattern as views uses for exposed filters now (Only letters, digits and the dot ("."), hyphen ("-"), underscore ("_"), and tilde ("~")),
Tests will prolly be red, still need to fix tests and maybe add some more coverage to ensure the new characters work fine.
Comment #4
StryKaizerComment #5
borisson_I added a test, this test proves that
^
is allowed in the url, I don't think that's right?Comment #8
StryKaizerProlly not, looks like you found a bug in views ;)
c/p regex from views
Lets create an issue for this in views, and follow their implementation, as exposed filters' Filter identifier is almost the same as our url_alias
Comment #9
StryKaizerComment #10
jhedstromI posted a patch to #2731333: Filter identifier in exposed filters allow more characters than description states. The core views exposed filter identifier was only tested with a space, and there was a typo in the regex.
Comment #11
StryKaizerUpdated regex with changes from #2731333: Filter identifier in exposed filters allow more characters than description states
Comment #12
borisson_Test agrees, thanks.
Comment #13
borisson_