Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)
Comment | File | Size | Author |
---|---|---|---|
#4 | 1983726-entity-features_rebuild.patch | 1.73 KB | mrfelton |
entity_features_rebuild.patch | 1.46 KB | hefox | |
Comments
Comment #1
hefox CreditAttribution: hefox commented....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.
Comment #2
kevinquillen CreditAttribution: kevinquillen commentedApplied 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.
Comment #3
mrfelton CreditAttribution: mrfelton commentedI'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.
Comment #4
mrfelton CreditAttribution: mrfelton commentedUpdated 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.
Comment #5
Fabianx CreditAttribution: Fabianx commentedRTBC works great here!
Comment #6
fagoThanks, 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.