Closed (fixed)
Project:
Default config
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2015 at 12:13 UTC
Updated:
16 Oct 2015 at 12:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mglamanPatch which implements suggested changes.
Comment #3
mglamanUpdate summary.
Comment #4
lslinnet commentedBased on the inherit broken structure of how enabled/disable vs install/uninstall works in Drupal 7, I am a bit reluctant to merge this commit – currently I would personally not expect settings I have configured for a given feature/functionality to be overwritten by disabling & enabling a feature.
I do however see why you would want to move the functionality to hook_modules_enabled, but I would say we then need some sort of indication that we haven't enabled the module yet – perhaps defining a variable and then only execute the code in hook_modules_enabled if that variable have been set in the install process of a module, unless there is another way of detecting if we are currently calling hook_modules_enabled due to a module installation?
Comment #5
mglamanI guess I'm confused. I agree Drupal 7's install/enable and disable then uninstall process is goofy. However, this module is a Features component. It does not work without Features. And it is deciding to rebuild its own components outside of the Features paradigm - which is its purpose! However, it should at least follow suite to the same methods. Features executes on this same hook. Otherwise defaultconfig is useless for permissions, which is one of its shining use cases.
Panelizer and Commerce (and Entity as a whole) provide unique permissions on a bundle by bundle or enabled config instance. If we use Features to export a Panelizer config and the permissions via defaultconfig we cannot. One would have to use another feature export thats runs after the Panelizer exports. That's way too much overhead and management.
Defaultconfig is currently being invoked on
hook_modules_installedfor every install. The only difference, as far as I have been able to detect, ishook_modules_enabledruns after install and schema has been provisioned.This is currently not being done on hook_installed and is always running, just as Features.
That is why I copied over this logic, for profiles which implement advanced management.
Comment #6
lslinnet commentedI think we are almost at the same page here, I do believe moving it to follow the same approach as features is the correct path to take – I do however wonder if we might introduce some annoying behavior, but guess we can avoid that if we just update the documentation and write it in the release note.
I am gonna apply the patch and then we will see if any issues arise, I do believe my concerns might be a little though up :)
Comment #8
lslinnet commentedComment #9
mglamanlslinnet you are amazing :) I definitely agree on your concerns, though. Thank you for getting this in, should resolve some oddball happens site builder may not be able to troubleshoot/grasp.