Various issues exist when trying to sync configuration between sites. This issue is tracking all the outstanding issues related to this topic. Please feel free to add new issues as they appear.

  1. #1889854: Config import breaks on protected entity properties
  2. #1831774: Config import assumes that 'config_prefix' contains one dot only
  3. #1901636: Importing a disabled format that is assigned to a role causes a fatal
  4. #1831774: Config import assumes that 'config_prefix' contains one dot only

Original issue:

I was attempting to bug hunt some stuff with sun today, and ran into the issue that I couldn't just put his cmi files in staging and import them. I ran into a number of issues one after the other that all probably have issues already, but as an example of the sort of stuff that's generally preventing CMI sync from working, I thought I'd make a patch and drop it here. I stopped after I ran into instances of cache_update table being called because I couldn't afford to debug further, but thought I'd at least provide the exception I stopped at, and the patch for stuff I fixed to get this far. This is intended to be informational. the fixes are pretty much 'quick and dirty'. Perhaps it can help troubleshoot other issues.

Files: 

Comments

tim.plunkett’s picture

Good sleuthing!

+++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.phpundefined
@@ -474,7 +474,7 @@ public function importChange($name, Config $new_config, Config $old_config) {
-      $entity->$property = $value;
+      $entity->set($property, $value);

This is #1889854: Config import breaks on protected entity properties

+++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.phpundefined
@@ -495,7 +495,7 @@ public function importChange($name, Config $new_config, Config $old_config) {
-    list(, , $id) = explode('.', $name);
+    list(, , $id) = explode('.', $name, 3);

I'm guessing this is #1831774: Config import assumes that 'config_prefix' contains one dot only?

+++ b/core/modules/user/user.moduleundefined
@@ -1964,15 +1964,17 @@ function user_role_grant_permissions($rid, array $permissions = array()) {
+    if (isset($modules[$name])) {

I wonder what $name was when this was false?

heyrocker’s picture

Issue tags: +Configuration system
tim.plunkett’s picture

FileSize
2.4 KB

There was only one more fix missing, the rest was actually just admin_menu (sorry sun!)

The user_role_grant_permissions() part was due to a text format that hadn't been enabled yet. Or something. That's the one that needs an issue.

tim.plunkett’s picture

Okay, here's the last of the bugs #1901636: Importing a disabled format that is assigned to a role causes a fatal

Should we just close this?

heyrocker’s picture

Status: Active » Closed (won't fix)

yeah, I'd rather just track the separate issues

tim.plunkett’s picture

The explode('.', $name, 3) part wasn't #1831774: Config import assumes that 'config_prefix' contains one dot only it was #1901988: Importing a ConfigEntity with a dot in the machine name fails. Sorry. But @EclipseGc++ for finding all of these

EclipseGc’s picture

Title: Importing new sites completely fail » META: Config syncing does not work reliably.
Status: Closed (won't fix) » Active

Let's turn this into a meta for tracking stuff related to config syncing.

EclipseGc’s picture

Issue summary: View changes

Switching this issue to be a meta issue.

xjm’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Parent issue: » #2121751: [META] Making configuration synchronisation work
xjm’s picture