Closed (fixed)
Project:
Location
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2014 at 17:18 UTC
Updated:
5 Jul 2014 at 15:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danielphenry commentedFixes the tokens function to verify the tokens belong to the module and use the correct token peices in the replacement.
Comment #3
leewoodman commented1: location_cck-tokens_fix-2189571-2.patch queued for re-testing.
Comment #5
cs_shadow commentedAttaching the patch in #1 rolled against latest HEAD.
Comment #6
garbo commentedI 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.
Comment #7
garbo commentedUpdate:
with this patch the tokens DO work when you use them in the custom breadcrumbs module. Just not in the path auto module
Comment #8
System Lord commentedCould 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%2045440Besides 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
Comment #9
garbo commentedHi Mark,
your issue is unrelated. Probably, you want to strip tags and strip whitespace before outputting.
Comment #10
System Lord commentedThanks, garbo. https://drupal.org/node/2247303
Comment #11
djdevinPatch 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.
Comment #13
djdevinRerolled
Comment #14
System Lord commentedWill 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(?)
Comment #15
podarok#13 commited
Thanks!