1

Got a really annoying thing related to config-import/export, due to the positioning of elements in the yml file the config never syncs between production server and development server.

For example:

diff --git a/config_webform/webform.webform.acceptance_criteria.yml b/config_webform/webform.webform.acceptance_criteria.yml
index d4d54d3..5c4a504 100644
--- a/config_webform/webform.webform.acceptance_criteria.yml
+++ b/config_webform/webform.webform.acceptance_criteria.yml
@@ -1,3 +1,4 @@
+uuid: 756ff0d5-8986-4d50-9097-80da19affd53
 langcode: en
 status: open
 dependencies: {  }
@@ -140,4 +141,3 @@ access:
     users: {  }
     permissions: {  }
 handlers: {  }
-uuid: 756ff0d5-8986-4d50-9097-80da19affd53

On the above example git diff, you can see the uuid element was removed from the bottom and added to the top. That's the only change. This was exported from local development server and if I try to import this to production server it never imports (keeps saying there's a config update after running drush config-import). So if I export the config from live, the uuid element is removed from the top and added back to the bottom.

Does anyone know if:

  • this is a bug with a specific module and the way it exports the config? (Webform in this example)
  • or a bug with core
  • or this is related to the different versions of server software (Either or all of: nginx/php/operating system/mysql)
  • or something I haven't mentioned above as one of the causes

I just wanted to know where to dig before digging in too deep in the wrong area.

  • I'd import a DB dumb from live locally, do the cex again, deploy, and then it should work. Although I can't answer why this strange behavior occurs. – leymannx Jun 11 '18 at 10:44
  • Thanks @leymannx. We have a clean database for local development installs, so I'm afraid this will keep happening unless we replace that clean database with the live copy (not ideal due to having to store large archive binaries in git). Hope someone else knows how to get to the bottom of this so it can work even on a clean dev database. – Beebee Jun 11 '18 at 11:03
  • Is it possible then that you cim the updated (live) webform.webform.acceptance_criteria.yml into the clean dev DB? And then dump the updated dev DB again? – leymannx Jun 11 '18 at 11:57
  • The uuid is always at the top. If it is at the bottom, you have wrong export. Also, the issue with import might be because you are missing _core in the config you are trying to import. See if it is present. – user21641 Jun 11 '18 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.