Closed (fixed)
Project:
Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Sep 2011 at 17:47 UTC
Updated:
29 Dec 2011 at 00:09 UTC
Jump to comment: Most recent file
Comments
Comment #1
mustanggb commented+1 and subscribing
Comment #2
rp7 commentedsubscribing
Comment #3
dave reidInitial patch.
Todo:
- Documentation
- Tests
Comment #4
dave reidComment #5
brant commentedsubscribe
Comment #6
fabianx commentedsubscribe
Comment #7
fenstratsubscribe
Comment #8
acbramley commentedsub. Patch failed on latest dev release, only the info file though.
Comment #9
acbramley commentedTested [node:menu-link:parents:join:?] not too sure where the "join" character is meant to go (I assume it should replace the question mark? If so, it didn't work for me.
Comment #10
acbramley commentedAh I got it [node:menu-link:parents:join:/] gave me an imploded url of parent menu items. I had to change punctuation settings to not remove slashes though, this means that slashes in node titles wouldn't be removed though but this should be fine.
Comment #11
acrollet commentedpatch in #4 applies cleanly to latest 7.x-1.x, taxonomy parents token works great, thanks much!
Comment #12
abaddon commentedsubscribe
Comment #13
dtrdewaele commentedOn what version do you apply the patch? Tried it on beta6 and dev release but both give errors. Tokens are available, but as soon as I bulk update my aliases, I get errors (deleted aliases first).
Comment #14
sense-designPlease apply #4 to your token module, then take this patch to patch the "token.tokens.inc", continue with #10 after that.
Comment #15
sense-designPlease ignore #14
Please apply #4 to your token module, then take this patch to patch the "token.tokens.inc", continue with #10 after that. This is the correct patch.
Comment #16
wojtha commented@sense-design I tried the patch from #15, but when I tried apply it I got:
So I applied the patch manually. Now when I look at diff I see the only change:
The other hunks from your patch #15 seems to be included in the previous patch #4 by Dave Reid. Is it correct? Or am I missed/overlooked something?
Anyway menu parents token seems to be working as expected.
Comment #17
redndahead commentedHere is a re-roll of #4
Comment #18
redndahead commentedThis is #15 rerolled and it seems wojtha is right about the only change. @sense-design can you explain why you added that piece?
Comment #19
redndahead commentedPer davereid in irc the token.inc portion shouldn't be there.
#3 is #17 patch without token.inc
#4 is #18 patch without token.inc
Comment #20
dave reidYeah the addition in #15 should also be ignored. It will not work.
Comment #21
redndahead commentedLooks like it passed. So 1266928-d7-3.patch should be the correct patch to use. Anyone care to RTBC?
Comment #22
dave reidWe still need additional tests to confirm all these tokens are working as expected and in the correct order.
Comment #23
redndahead commentedI'm having a difficult time trying to figure out the tests. Any chance of getting an example of the taxonomy parents test and then I can maybe figure out the menu one from there?
Comment #24
mjcarter commentedI just tried this out, parents token showed up in replacement patterns with no problems, but trying to generate aliases I got:
Fatal error: Class 'MenuTokenObject' not found in C:\xampp\htdocs\website\sites\all\modules\token\token.module on line 936
This is using the beta 7 release, should I be using the dev version?
Edit: Tried the dev release:
Fatal error: Class 'MenuTokenObject' not found in C:\xampp\htdocs\website\sites\all\modules\token\token.module on line 936
Line 936 is $cache[$mlid] = array($plid => new MenuTokenObject($parent)) + $cache[$mlid];
I tried both patch d7-3 and d7-4 and get the same error with both.
Comment #25
redndahead commentedIt seems the token.inc file that was removed from this patch contained the MenuTokenObject class. @davereid is there another patch somewhere that needs to get pushed forward so token.inc can be added?
Comment #26
dave reidAdding blocker tag.
Comment #27
dave reidHere is the version without needing the objects which should have been left for #1195874: Need to figure out how to create nested tokens from the array token type and not been merged into this issue. This also includes additional tests to ensure the tokens work properly.
Comment #28
dave reidThis passed the bot and locally for me, so committed #27 to Git. Thanks all!
http://drupalcode.org/project/token.git/commit/c4e5564
Comment #29
redndahead commentedSorry I didn't get to it in time. Thanks for committing quickly.
Comment #30
dave reidComment #32
tahiticlic commentedHi,
this is quite good, but doesn't mimic completely the behavior of termpath token seen on D6. Especially, there's no more "/" separator between terms, and this "/" is replaced by a "-" : is there a way to avoid this?
I mean, on D6 you were able to mix "-" (in the term) and "/" (between terms).
Comment #33
tahiticlic commentedComment #34
dave reidPlease see #1046972: Provide an [array:join-path] token