Problem

See problem definition in #3092272: [Meta] [PP-1] Moving away from features.

Solution

  • Remove the module.features.yml file
  • Move the default editable config from hook_install() into a module's config/install/*.yml file.
  • If hook_install alters configuration from other modules, consider whether we should include the config file in the profile's config/install folder to overwrite it instead
  • Remove any _module_set_defaults function

Steps to reproduce

  • Enable all changed modules
  • See that none of them install configuration provided by other modules
  • Change configuration for each module
  • Revert features

Expected result (after fix)

The changed configuration keeps its changes.

Actual result

The changed configuration is reverted to default values.

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

Assigned: kingdutch » Unassigned
Status: Active » Needs work

Initial work done here: https://github.com/goalgorilla/open_social/compare/feature/3100558-unfea...

Open questions:

  • Does configuration from the social config/install folder get installed even if the module that defines the configuration is not there?
  • If that's the case, does moving this to optional fix it?

Depending on the above, we may need to move mentions.mentions_type.UserMention into an install hook or we can move the mentions.settings out of _social_mentions_set_default_config and into a yml file in the correct folder.

kingdutch’s picture

Status: Needs work » Needs review

So the answer is: no, if the module is not there then the config will not be installed. However when the configuration is installed from a module the config/install folder of the profile will properly be checked. So this works fine.

kingdutch’s picture

ronaldtebrake’s picture

Status: Needs review » Fixed

  • ronaldtebrake authored 58339e7 on 8.x-8.x
    Merge pull request #1672 from goalgorilla/feature/3100558-unfeature-...
  • Kingdutch committed a6fe08a on 8.x-8.x
    Issue #3100558: Remove features from Social Mention module
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.