Location cck tokens don't work at all. Patch to fix will be attached shortly.

Comments

danielphenry’s picture

Status: Active » Needs review
StatusFileSize
new3.64 KB

Fixes the tokens function to verify the tokens belong to the module and use the correct token peices in the replacement.

Status: Needs review » Needs work

The last submitted patch, 1: location_cck-tokens_fix-2189571-2.patch, failed testing.

leewoodman’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: location_cck-tokens_fix-2189571-2.patch, failed testing.

cs_shadow’s picture

Status: Needs work » Needs review
StatusFileSize
new1.99 KB

Attaching the patch in #1 rolled against latest HEAD.

garbo’s picture

I tried this patch but I still am not able to use the location cck tokens in my pathauto patterns.

I receive the error that the token is invalid.

garbo’s picture

Update:

with this patch the tokens DO work when you use them in the custom breadcrumbs module. Just not in the path auto module

System Lord’s picture

Could this be causing token issues in views as well? I'm trying to rewrite a token into a link:

google.com/maps/dir//[field_dr_address]

and it works except this is the generated URL:

http://google.com/maps/dir//%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%204713%20croftshire%20dr%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kettering,%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20oh%20%20%20%20%20%20%20%20%20%20%20%20%20%2045440

Besides looking crazy fouled up it works. My users my copy the link location so I can't keep it like this.

If this seems like an unrelated issue I'll submit a new one.

Thanks

garbo’s picture

Hi Mark,

your issue is unrelated. Probably, you want to strip tags and strip whitespace before outputting.

System Lord’s picture

djdevin’s picture

StatusFileSize
new1.94 KB

Patch doesn't work in some cases because "return" gets called, and location_cck_tokens() never finishes. This may also fix issue in #7. Basically if you have other tokens besides location, it was preventing the tokens from being replaced.

Changed returns to continue, which will skip non-location fields but process the location ones.

Status: Needs review » Needs work

The last submitted patch, 11: location-cck_tokens-2189571-11.patch, failed testing.

djdevin’s picture

Status: Needs work » Needs review
StatusFileSize
new1.94 KB

Rerolled

System Lord’s picture

Will this patch work in Views for rewrites? Ex: [profile:field_type_location:city]

This topic seems similar to: https://drupal.org/node/1056154. There seems to be two different solutions for the same problem(?)

podarok’s picture

Status: Needs review » Fixed

#13 commited
Thanks!

  • Commit 60dfe73 on 7.x-3.x authored by djdevin, committed by podarok:
    Issue #2189571 by djdevin, cs_shadow, danielphenry: Fixed location cck...

Status: Fixed » Closed (fixed)

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