PSA: Config Split and Drupal 9.3

Fabian Bircher
14 Dec 2021
2 Comments
Fabian Bircher
14 Dec 2021
2 Comments
Fabian Bircher, 14 Dec 2021 - 2 Comments

PSA: Config Split and Drupal 9.3

Beware of subtle behavior change with Drupal 9.3+ and Config Split 1.x

Drupal 9.3.0 was just released! It contains a lot of cool new things we are excited about but for users of Config Split there is one change that will impact on what is split off by Config Split.

For those unfamiliar with it, Config Split is a Drupal module developed by Nuvole, which splits the configuration when it is exported and merges it back together when it is imported. It is useful in many scenarios but best tailored to having some configuration only in some environments (for example the Devel module only in development environments).

The important change in Drupal 9.3+ is that permissions must exist. This is enforced with configuration dependencies which roles can now have.

Config Split 1.x will split off all the config which depends on the module you split off. Which means that if a role has a permission from the module you are splitting off, it will then in turn also be split. This is how Config Split 1.x works and it is not considered a bug. However, most likely this is not what you wanted, so what is the solution?

Use Config Split 2.x! The new version is currently still in beta but I aim to tag a new release soon. In particular Config Split 2.x splits off modules as if they had been uninstalled. Which means that instead of splitting the role completely, it will just remove the permissions and save them in a patch for the role.

There are still a few open issues though and probably more testing is needed too. One of the issues I would like to merge before 2.0.0 is #3238855. So if you have some moment to give it a try and mark it as RTBC then that would be great! Also of course don't hesitate to report new bugs too or contribute with patches/MRs. And if coding or testing is not your strength then we also need still a lot of documentation.

I hope to tag a stable 2.0.0 release for Config Split soon and then Config Split 1.x will become unsupported when Drupal 9.2 becomes unsupported.

Config Role Split (one of the obscure modules in the long tail of config_* modules) has an even deeper existential crisis and may become unsupported altogether unless someone wants to become a maintainer. Probably the main use case for Config Role Split is now automatically addressed with Config Split 2. since roles have dependencies. But if you rely on some other feature you should reach out and start maintaining it.

Comments

Comments

Proteo
20 Dec 2021

Hi, I think that one of the goals of this change was to automatically delete static permissions when a module was uninstalled, but the issue you're linking to is such a monstrosity, so I couldn't find a definitive answer.

I've developed a few custom modules that will need to be updated if the answer is no...

Hi, I think that one of the goals of this change was to automatically delete static permissions when a module was uninstalled, but the issue you're linking to is such a monstrosity, so I couldn't find a definitive answer.

I've developed a few custom modules that will need to be updated if the answer is no...

Proteo, 20 Dec 2021

Hi, I think that one of the goals of this change was to automatically delete static permissions when a module was uninstalled, but the issue you're linking to is such a monstrosity, so I couldn't find a definitive answer.

I've developed a few custom modules that will need to be updated if the answer is no...

Proteo, 20 Dec 2021
Wyatt
7 Jan 2022

Thanks for finally writing about > PSA: Config Split and Drupal 9.3 | Nuvole "УСС-электро" - электромонтажные работы</a>

Thanks for finally writing about > PSA: Config Split and Drupal 9.3 | Nuvole "УСС-электро" - электромонтажные работы</a>

Wyatt, 7 Jan 2022

Thanks for finally writing about > PSA: Config Split and Drupal 9.3 | Nuvole "УСС-электро" - электромонтажные работы</a>

Wyatt, 7 Jan 2022

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Get your project started today!

Contact us