Commit 7a94e4cc authored by Dave Reid's avatar Dave Reid

Issue #1112770 by David_Rothstein: Fixed entity info needs to be cleared when...

Issue #1112770 by David_Rothstein: Fixed entity info needs to be cleared when saving or deleting menus.
parent 3382d285
......@@ -145,6 +145,10 @@ function xmlsitemap_menu_menu_insert(array $menu) {
if (isset($menu['xmlsitemap'])) {
xmlsitemap_link_bundle_settings_save('menu_link', $menu['menu_name'], $menu['xmlsitemap']);
}
// When menus change, the bundles we defined in
// xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache.
entity_info_cache_clear();
}
/**
......@@ -154,6 +158,10 @@ function xmlsitemap_menu_menu_update(array $menu) {
if (isset($menu['xmlsitemap'])) {
xmlsitemap_link_bundle_settings_save('menu_link', $menu['menu_name'], $menu['xmlsitemap']);
}
// When menus change, the bundles we defined in
// xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache.
entity_info_cache_clear();
}
/**
......@@ -161,6 +169,10 @@ function xmlsitemap_menu_menu_update(array $menu) {
*/
function xmlsitemap_menu_menu_delete(array $menu) {
xmlsitemap_link_bundle_delete('menu_link', $menu['menu_name']);
// When menus change, the bundles we defined in
// xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache.
entity_info_cache_clear();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment