Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293317

Wrong bundle title after renaming node type

$
0
0

Changing the machine name ('type') of a node type leads to the entity info cache getting cleared.
However, changing the human-readable name ('name') of a node type doesn't, so entity_get_bundles() (in D8) resp. entity_get_info() (in D7) keep emitting the obsolete bundle title.

Consequences:
At least fully entity enabled contrib modules rely on this data, so they will show the wrong titles until the next entity_info_cache_clear().

So we need to do this entity_info_cache_clear() rightaway:

D8
In the D8 case I expanded entity_invoke_bundle_hook() for the 'update' case, so we're triggering an 'entity_bundle_update' hook some contrib modules with additional caches might need. If we go with this, I'll add tests and a change record, if needed.
D7
It seems a 'nice to have' so for now I didn't bother to create a hook in the D7 case. Just calling entity_info_cache_clear().

Viewing all articles
Browse latest Browse all 293317

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>