Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the content.token.inc file, that holds the token generation code, is included in content_init().
hook_init() is not fired on update.php, thus node_save() calls in hook_update_N() completely mess pathauto aliases containing CCK tokens.
Comment | File | Size | Author |
---|---|---|---|
#3 | cck_tokens_updatephp-1533506-3.patch | 12.16 KB | yched |
#1 | cck_tokens_updatephp-1533506-1.patch | 1.07 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedAttached patch includes the file directly at the root of content.module
Comment #2
yched CreditAttribution: yched commentedCommitted.
Comment #3
yched CreditAttribution: yched commentedActually, module_load_include() in global context is frowned upon - #599122: Do not use module_load_include() in global context, I even RTBC'ed that patch.
New patch using require_once instead, and moving all field-type tokens to their providing modules.
(diff against 2.x before patch #1)
Comment #5
MegaChriz CreditAttribution: MegaChriz commentedMarked #1354738: Token hooks not loaded and CCK tokens are not available as a duplicate of this issue.