When taxonomy menu rebuild a menu it handles, it destroys mlid's in menu database and recreate new ones. Using your module, this breaks all rules based on menu items that matches mlid's generated with taxonomy menu.

I did a simple integration, that works well with a patched version of taxonomy_menu 6.x-2.3 (2.5 is still too buggy, and patch is necessary because some taxonomy_menu hooks are not invoked in some cases, see #766480: taxonomy_menu_handler() is not called in _taxonomy_menu_delete_all() for the explanation and patch).

Note: This patches is based on a dynamic module's integration using a cached list of files to load if any of these files provides integration for this module and if the module is enabled. File list cache is wiped out when modules are disabled/enabled, such as drupal core always do. This mecanism can be re-use for any other module integration.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pounard’s picture

Bugfixed my own patch :)

Using the hook_exit() is quite ugly but there is no other way since taxonomy_menu does not fire any hook *after* it did changes the database. Another way would have been to store diff in some kind of cache and allow a hook to alter rules when they are loaded so using the diff cache just before rules loading would have permit to alter theme and save them.