This is one of those cases where the problem isn't really in this module, but I feel like it is Token's responsibility. When Flag, Token, and XMLSitemap Menu are all enabled, there is an undefined index of 'token type' on line 88 of flag.tokens.inc, in flag_tokens_info(). token_entity_info_alter() is supposed to put that key in the entity info, so I started trying to figure out which entity type was broken. It turns out that it's "menu_link", which is a type added by xmlsitemap_menu_entity_info_alter(). Naturally, token_entity_info_alter() runs before xmlsitemap_menu, and it's definition of menu_link doesn't include a 'token type' key.
Now, any of these modules could be patched to fix this problem, but I feel that if Token is going to try to add this key to some entity types, it ought to try to do them all. And the obvious solution to that is to make its implementation of hook_entity_info_alter() be last in line.
Comment | File | Size | Author |
---|---|---|---|
token_entity_info_alter.patch | 503 bytes | Island Usurper | |
Comments
Comment #1
Agileware CreditAttribution: Agileware commentedWorks for me.
Setting issue status to needs review for the patch.
Comment #2
pog21 CreditAttribution: pog21 commentedI was about to apply this patch, but disabling/re-enabling the xmlsitemap module fixed it for me.
Comment #3
Dave ReidThis is a duplicate #2223911: xmlsitemap_menu.module uses hook_entity_info_alter(), and so doesn't get a token type set by token module. Just update to the latest version of XML sitemap.
This is an alter hook, all the entity types are supposed to be there, so I don't really think we need to re-order this, but XML sitemap is a special case.