Patch in #1356276: Allow profiles to define a base/parent profile allows to use sub-profiles in Drupal. Config_update does not find the config files included in sub-profile.

I have postponed this issue as sub-profiles are not yet supported by core, but in case config_update would have a patch prepared I would be happy to use it. If I will have some time, I will try to write a patch for this..

CommentFileSizeAuthor
#5 2945742-5-sub-profiles.patch3.96 KBPasqualle
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pasqualle created an issue. See original summary.

jhodgdon’s picture

Oh interesting!

The code for profiles is kind of hard-coded in this module, on the previously-valid assumption that there would only be 1 profile. So, we'll definitely have to rewrite that code. Waiting until the API for this in Core is settled probably makes sense?

Grepping for profile in the code, it looks like we'll need to touch:
- ConfigUpdateController (in UI module)
- ConfigProfileOverridesTest, ConfigUpdateTest (in UI module)
- config_update_ui.drush.inc (in UI module)
- ConfigLister, ConfigListerWithProviders (in base module)
- ConfigListerTest (in base module)

Actually... this is going to be a bit problematic, because ConfigListInterface::listConfig() documents that $name is ignored in the case of a 'profile' list, and we will need to change that behavior so you can specify either the active profile itself or a profile in its chain of base profiles. I think that's OK though -- we can make it so if $name is omitted, it will default to the active profile, so that no backwards-compatibility issues come up.

Anyway... a bit complicated. But we definitely need to wait and see what API is finally provided in Core for having base profiles, and then figure out what we need to do, I think?

jhodgdon’s picture

One thing that will need attention for sure when sub-profiles are supported by Core is to make sure the provider lookup (for the report as well as diffs) is working. See #3003469: Source of config is inconsistent between modules and profiles.

jhodgdon’s picture

Pasqualle’s picture

Almost working patch.
Base profile optional items do not work, that is probably the @todo in the patch.

Pasqualle’s picture

hmm, some of the items in the base profile optional folder are not even installed (even all dependencies are met). The issue might be in core or in the core patch..

Pasqualle’s picture

another issue: base profile listed under modules also on "Updates report" page

Pasqualle’s picture

The latest core patch seems to fix all of my issues. So config_update works correctly for me with this patch using sub-profiles.

But it seems the core sub-profile patch will not be used for now as the profile system will be improved first in #2186491: [meta] D8 Extension System: Discovery/Listing/Info.

jhodgdon’s picture

OK, well once Core figures out what it is doing, we can update Config Update so it works with Core. Thanks for the update!

RoSk0’s picture

FYI: Original sub-profile support issue #1356276: Allow profiles to define a base/parent profile ran out of allowed comments/attachments ... And couldn't be updated any more (reported in #3265696: 5xx on any update to #1356276 issue). So I created a continue issue for it - #3266057: Allow profiles to define a base/parent profile [continue of #1356276].

With regards to this project: we are using it on the website built with the sub-profile - configuration items are shown for both parent and child. We are in the beginning of our journey so will provide feedback as we go. One thing I noticed today - an item from the changed configuration table on the "All configuration" report is not reverted after "Revert to source" action and success message. Will see if I can get to the bottom of it.