localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Remove hook_install

Open finnlewis opened this issue 10 months ago • 2 comments

@ekes mentioned that in order to install from config, we need to remove the hook_install from the profile.

https://github.com/localgovdrupal/localgov/blob/3.x/localgov.install#L17-L38

Where should we move this to?

finnlewis avatar Feb 13 '25 15:02 finnlewis

The two parts setting the default homepage would go nicely with #823.

I'd put the part commented "Enable entity_usage for media by default." in localgov_core or maybe its submodule localgov_media.

rupertj avatar Feb 14 '25 16:02 rupertj

The homepage would nicely be replaced by the same sort of generate a homepage and set it behaviour that Microsites has.

I'd put the part commented "Enable entity_usage for media by default." in localgov_core or maybe its submodule localgov_media.

Hmmm... maybe a hook_modules_installed so at any time entity_usage is installed in auto configures it, the profile will install it; but it doesn't require entity_usage because it's not to say that it's the solution used by everyone (there was discussion about different media tracking). Ohh... It's paragraphs that actually requires it (profile just gets it incidentally because of that)

❯ rg "drupal\/entity_usage" web
web/modules/contrib/localgov_paragraphs/composer.json
13:        "drupal/entity_usage": "^2.0@beta",

web/modules/contrib/paragraphs/composer.json
19:    "drupal/entity_usage": "2.x-dev",

web/modules/contrib/layout_paragraphs/composer.json
23:    "drupal/entity_usage": "2.x-dev",

It could even go in there! But hook_modules_installed in localgov_media might make more sense.

ekes avatar Feb 18 '25 11:02 ekes