This has been fixed in the latest dev. Just wanted to document it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derhasi’s picture

Status: Fixed » Needs review
FileSize
703 bytes

@fmuzzel, great you worked on this.
For referencing a patch file for other users: it lays here.

But there's still a little work to do. The problem is, when you want to overwrite the existing bundle with the settings from the feature, this currently is not possible, as the ->save() currently denies to write the object. So for the features part, we first have to load the existing Bundle, and then populate the properties.

This should be fixed with the attached additional patch for 7.x-2.x-dev.

fmizzell’s picture

Status: Needs review » Closed (fixed)
joelstein’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
FileSize
520 bytes

This needs to be re-opened, because it's currently impossible to revert a bundle in Features.

To see this in action, do the following:

  • Install vanilla Drupal, Features (latest stable), and ECK 7.x-2.x-dev.
  • Add entity type and bundle.
  • Create new feature with entity type and bundle, and then enable this feature.
  • In the myfeature.features.inc file, change the bundle's label.
  • Now try to revert the feature. It won't work.

I did a lot of troubleshooting, and for the life of me I don't understand what is causing this. All I know is that during the feature rebuild, when it looks up the bundle by machine name, it doesn't see the bundle's ID. I did lots of troubleshooting, and for some reason the cached bundle ID gets lost before we get to this function, thus telling ECK that it's a "new" bundle, which wrecks havoc during the save (aka, it won't save).

This simple patch does the trick by resetting the cached bundles before reverting.

joelstein’s picture

Status: Needs review » Closed (fixed)
Related issues: +#2500341: Cannot revert bundle in Features

Sorry for re-opening a really old issue. I created a new one at #2500341: Cannot revert bundle in Features.