diff --git a/field_collection.module b/field_collection.module index bb4969a..5537c75 100644 --- a/field_collection.module +++ b/field_collection.module @@ -1299,7 +1299,10 @@ function field_collection_field_create_field($field) { // Clear caches. entity_info_cache_clear(); - menu_rebuild(); + // Do not directly issue menu rebuilds here to avoid potentially multiple + // rebuilds. Instead, let menu_get_item() issue the rebuild on the next + // request. + variable_set('menu_rebuild_needed', TRUE); } } @@ -1313,7 +1316,10 @@ function field_collection_field_delete_field($field) { // Clear caches. entity_info_cache_clear(); - menu_rebuild(); + // Do not directly issue menu rebuilds here to avoid potentially multiple + // rebuilds. Instead, let menu_get_item() issue the rebuild on the next + // request. + variable_set('menu_rebuild_needed', TRUE); } }