Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure if this is supposed to be supported, but if I split out my core.extension.yml
file, and then try and run a config-split-import
I get the following error:
PHP Fatal error: Call to undefined method Drupal\cm_config_tools\ConfigInstaller::getSourceStorage() in /var/www/wateraid/mysite/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 128
Comments
Comment #2
bircherThis looks like an issue with cm_config_tools, both from the error message and because even though that is quite a strange use case it would still work with config_split. The blacklisted modules wouldn't have an effect though because you split off the core.extensions and they then take precedence for what will be enabled when merging the splits.
cm_config_tools uses their own way of managing the configuration synchronization workflow, and use their own directories and not the config.storage.sync service. It probably doesn't merge the folders the way config_split splits them. To me it seems that the two modules try to solve the same use case but with different methods and are therefore not compatible.
I am transferring it to the cm_config_tools queue, feel free to close it the use case is not supported.
Comment #3
james.williams CreditAttribution: james.williams at ComputerMinds commentedOo crikey, someone's using cm_config_tools together with another config workflow module ... I'll take a look, but I'm not sure I'd encourage cm_config_tools to be used together with another config workflow module like config_split, as they're for quite different workflow use cases.
I have never tried ensuring core.extension will work with cm_config_tools by the way, so that may well be the issue, I don't know. It may be that I just need to explicitly stop that being supported, or at least document it if it can't be made to work.
Having said that, just because I didn't design it to work, doesn't mean it can't! I'll take a look to see if there's a simple solution but it would help to know: what's your reason for using both cm_config_tools and config_split together?
If it's just for evaluating the two, I can't really help - I'd need a 'real' use case please to work towards.
Comment #4
james.williams CreditAttribution: james.williams at ComputerMinds commented(Changing to support request because I don't think this is to do with the intended use case for cm_config_tools. I'll happily change that once we've got some answers to figure things out :-) )
Comment #5
Leon Kessler CreditAttribution: Leon Kessler at Mirum Agency commentedAh sorry my bad. Was prototyping a plethora of config management modules, and inadvertently had them both enabled. No actual use-case for using the two modules together so think this ticket can be closed.
Comment #6
james.williams CreditAttribution: james.williams at ComputerMinds commentedDone some more digging ... turns out this isn't specifically to do with config_split either, but would actually happen if ever doing a configuration synchronisation (i.e. using the core config sync), that causes a module to be newly installed, whilst cm_config_tools is enabled.
Reality is that cm_config_tools is to be used for a workflow that doesn't use core config sync (but the drush cmci/cmce commands instead). But I think this could certainly be considered a bug. Unfortunately the bug is really in core, because the method being called isn't in the ConfigInstallerInterface, so cm_config_tools doesn't know it should implement that method. Core's ModuleInstaller should not call the (public)
getSourceStorage()
method, because it is assuming which class is being used for a service, whereas it should only assume what the interface states. I'm going to open a core issue!