This is about token integration.
See http://drupal.org/node/324736#comment-1115069
I'm quite new to Drupal and PHP so I could be wrong but that's what it looks like to me. Can someone with more experience confirm?
This is about token integration.
See http://drupal.org/node/324736#comment-1115069
I'm quite new to Drupal and PHP so I could be wrong but that's what it looks like to me. Can someone with more experience confirm?
Comments
Comment #1
yched commentedSorry - what's the exact issue with CCK tokens please ?
Comment #2
pauline_perren commentedIf several modules make the same token keys available via the hook_token_values (as do Text and Number in CCK) then, when the token module calls module_invoke_all() to call all the hook implementations, it creates an array of values for that replicated key in its output array. This occurs through the call to array_merge_recursive() that it makes to put all the returned token key/replacement string arrays together.
Since this is supposed to be an array of string tokens and their replacement strings, this causes problems.
The problem I was seeing can be replicated by:
The approach some of the CCK plugin modules have been taking is to prefix the token keys they provide with their module name to make them unique. If CCK followed that approach it would mean a few changes to the includes/content_token.inc file along the lines of:
From:
to
I've made these changes in my code and it seems to work. I haven't tried any more complicated testing that this test case though and I don't really know of other ways to test token functionality (very new to Drupal etc etc).
I've been using the latest official release for all modules.
Comment #3
pauline_perren commentedGuessing I should have set it back to active after providing more info