Entity is implement what I like to call "Faux exportables," exportables that need to be always in the database. Those are suppose to implement hook_features_rebuild so features rebuild as needed.

(And uh, I sorta snuck some code comment changes cause they're not using implements hook_x)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

....annndd I messed up the implements comment. I believe I copied and pasted from entity_features_api comment which is wrong :(. Le'sigh; waiting for input on patch before remaking.

kevinquillen’s picture

Applied this patch. I could implement permissions manually in hook_enable in my Feature module, but still could not use these same permissions normally with a Features permissions export. Trying to enable the feature still throws 'column "module" cannot be null' error - related to an entity type.

mrfelton’s picture

Issue summary: View changes
Status: Needs review » Needs work

I'm experiencing an issue similar to @kevinquillen in #1063204-75: Adding a new permission causes integrity constraint violation. This patch did not resolve the issue andI still get warnings like "Warning in features rebuild of sac_deal. No module defines permission "update sac_deals_industry entityqueue" on install and no permissions configured.

mrfelton’s picture

Status: Needs work » Needs review
FileSize
1.73 KB

Updated the patch to apply against latest code base. This patch does ensure that exportable components that are defined by entity module are properly reverted and rebuilt when features are installed/reverted.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC works great here!

fago’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Thanks, this seems to be a reasonable improvement - however there is also #2241979: Add a way to prevent exportable rebuild on cron run which tries to improve it further so it supports skipping rebuilding during cache clears.

Let's collaborate over there to implement a good solution working with features_rebuild_on_flush on and off.