Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Title: Entity displays are not renamed when a bundle is renamed. » Entity displays are not renamed/deleted when a bundle is renamed/deleted.

Better title - patch coming up

swentel’s picture

Status: Active » Needs review
FileSize
1.4 KB
swentel’s picture

FileSize
1.4 KB

This is better

yched’s picture

Looks good.

It also shows the absurdity of "entity module has to implement hooks defined by Field API to be aware that an entity bundle was created/renamed/deleted". Totally upside down.

We really need to move field_attach_CUD_bundle() + hooks to entity API. I'll bump #1374116: Move bundle CRUD API out of Field API. Any takers welcome :-/

swentel’s picture

FileSize
3.21 KB
1.8 KB

And now with tests.

swentel’s picture

FileSize
3.41 KB

This also has a delete test.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Minor: The test doesn't really need to create a field and instance ?

Other than that, this looks RTBC.

swentel’s picture

FileSize
1.1 KB
3.08 KB

Right, better patch.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1950326-8.patch, failed testing.

swentel’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2 KB
3.28 KB

And this is even better, thank you alexpott!

yched’s picture

Better indeed, but another nitpick then :-p

foreach ($entity_display_names as $name) {
was replaced by
foreach ($ids as $id) {
in entity_field_attach_delete_bundle().
+1.

Same thing should be done in entity_field_attach_rename_bundle() for consistency ?

swentel’s picture

FileSize
1019 bytes
3.24 KB

Right!

yched’s picture

We're all set then. RTBC it is.

xjm’s picture

#12: 1950326-11.patch queued for re-testing.

xjm’s picture

Issue tags: -Needs tests

Wheee

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed b71bc2c and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.