Skip to content

Fix: Missing update hook for lgms_modules_disabled field on existing installs#571

Open
sinhaparth5 wants to merge 1 commit intolocalgovdrupal:4.xfrom
Webcurl:fix/missing-modules-disabled-field
Open

Fix: Missing update hook for lgms_modules_disabled field on existing installs#571
sinhaparth5 wants to merge 1 commit intolocalgovdrupal:4.xfrom
Webcurl:fix/missing-modules-disabled-field

Conversation

@sinhaparth5
Copy link

Description

The field lgms_modules_disabled was introduced to the localgov_microsites_group module (found in config/install), but there is no corresponding update hook to create this field for sites that were installed prior to its introduction.

Currently, code in ContentTypeHelper::moduleEnable() assumes this field exists. On older installations, this leads to fatal errors or warnings because the Entity API cannot find the field definition in the active configuration, even if the column has been manually added to the database.

Proposed Resolution
Add an update hook (10002) to localgov_microsites_group.install that:

Checks if field.storage.group.lgms_modules_disabled exists.

Checks if field.field.group.microsite.lgms_modules_disabled exists.

Creates them programmatically if they are missing to bring the site schema in line with the module's config/install definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant