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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

The 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

glennpratt’s picture

If I try to patch this, what version are you accepting patches against?

dawehner’s picture

Use 2.8 or 3.x i guess the class is the same currently.

glennpratt’s picture

Component: Miscellaneous » node data
Category: support » bug
Status: Active » Needs review
FileSize
1.6 KB

First swing at a patch, adds machine name as an option for the field handler. Feedback would be appreciated.

glennpratt’s picture

FileSize
1.6 KB

Whoops, botched the patch file name...

merlinofchaos’s picture

Status: Needs review » Needs work

This looks decent. However, the option needs to be defined in option_definition() or it wont' be saved in 3.x.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.54 KB

The same patch with option_definition

merlinofchaos’s picture

Version: 6.x-2.8 » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)

Committed to 6.x-2.x and 3.x. Does not seem to apply to 7.x (not terribly surprised).

dawehner’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.96 KB
0 bytes

Here is a patch to review

dawehner’s picture

Status: Needs review » Fixed

i tested it with manual testing.

glennpratt’s picture

Sweet, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.