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.
I'm passing Node: Type fields to a view argument (Node: Type) by generating links with this replacement pattern:
my_node_view/types/[type]
This works fine except when there is a space (and perhaps other odd characters) in the node type. In this case I get a blank view.
Manually entering a link with spaces replaced with %20 doesn't work either.
Curious if I'm missing something obvious or if there is a workaround.
Comment | File | Size | Author |
---|---|---|---|
#9 | views-689260-5_0.patch | 0 bytes | dawehner |
#9 | views-689260-5_0.patch | 1.96 KB | dawehner |
#7 | views-689260-5.patch | 1.54 KB | dawehner |
#5 | views-689260-5.patch | 1.6 KB | glennpratt |
#4 | views-68920-4.patch | 1.6 KB | glennpratt |
Comments
Comment #1
dawehnerThe problem is that [type] is the human readable version, but the argument expects the machine readable version of it. Perhaps there should be type-type and type-name
Comment #2
glennpratt CreditAttribution: glennpratt commentedIf I try to patch this, what version are you accepting patches against?
Comment #3
dawehnerUse 2.8 or 3.x i guess the class is the same currently.
Comment #4
glennpratt CreditAttribution: glennpratt commentedFirst swing at a patch, adds machine name as an option for the field handler. Feedback would be appreciated.
Comment #5
glennpratt CreditAttribution: glennpratt commentedWhoops, botched the patch file name...
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedThis looks decent. However, the option needs to be defined in option_definition() or it wont' be saved in 3.x.
Comment #7
dawehnerThe same patch with option_definition
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to 6.x-2.x and 3.x. Does not seem to apply to 7.x (not terribly surprised).
Comment #9
dawehnerHere is a patch to review
Comment #10
dawehneri tested it with manual testing.
Comment #11
glennpratt CreditAttribution: glennpratt commentedSweet, thanks!