localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Add an install step so modules can perform tasks at the end of the install process.

Open rupertj opened this issue 1 year ago • 2 comments

This idea comes from the conversation in https://github.com/localgovdrupal/localgov_core/pull/212

If we add a new install step to the LDG profile, and use that to call a hook, we can use that hook in our own modules to perform tasks later in the install process than using hook_install() or hook_modules_installed() would allow.

The specific use case we want this for is to allow localgov_core to install default blocks on behalf of other modules during the installer. If we use hook_modules_installed() for this, it's too early in the install process, and the site's themes aren't set up yet.

Adding our own install step solves this problem by running much later in the install process. The only thing that comes after is downloading translation data.

rupertj avatar Jul 31 '24 11:07 rupertj

This is implemented in PR #751

rupertj avatar Jul 31 '24 16:07 rupertj

If/when this issue lands we could potentially deprecate the hook this PR introduces in favour of the new core hook.

rupertj avatar Jul 31 '24 16:07 rupertj