I have a problem with syncing my config to the remote server with Drupal 8. When I pull everything with GIT, and use drush to update the config via drush cim I get the following error:

Attempt to save a configuration entity 'field_bestand_en_' with UUID '' when this entity already exists with UUID

So the problem is that the UUID doesn't match, the new file for some reason lost its UUID and is null now. I tried adding the given UUID by hand to the right yml file but on every new config update it gets overwritten.

So when I do drush cex locally, the UUID is null again. How can I fix this, I guess deleting the field and creating it will fix it but this is not really an option.

Thanks in advance


I was synchronizing the configuration between local environment and remote repo, and after doing the Pull and drush cr, when using drush cim, I got a similar error.

In my case, the UUID (unique identifier of Drupal element), of the configuration entity was in NULL value. Since I didn't know the origin of this, I went to the remote repository and I saw that it was pushed like this. In origin, it seems an export failure (drush cex).

I solved it by getting the number and writting the UUID (it's the same one that announces the error of drush cim by console). I edit the field configuration file and change NULL for this value of the UUID and again drush cim works again. Next, it is important to commit this change to remote (git push) so that it can be modified there, otherwise it can be lost locally after a global "pull".

drupal 8 drush cim import error

  • Yes, the error message suggests somehow the configuration item is getting stored with an empty UUID, so that's the issue to worry about. I did a quick search to see if it's a known error but nothing turned up. – Alfred Armstrong Aug 22 '18 at 9:42

Drupal 8 configuration was designed to manage configuration on different instances of the same Drupal site. The best way to start local development is to copy the entire database from the remote site to your local site, e.g. using drush sql-sync.

If you do not wish to copy your entire live database on your local site, then you need to be sure to import your configuration at site-install time. There are two ways to do that:

  • Using drush site-install with the --config-dir option
  • Using the config installer

If you start off your local site like this, then your uuids will remain in-sync, and you will be able to export your config from the local site and re-import it on the remote site.

  • Hi Greg, Thanks for your reply. And sorry if I wasn't clear i have been working on this site for more then a month now with local and remote in sync. Since yesterday I have this problem out of nowhere, i didn't even change the field. So I do know how to start with a project but since I'm working on this for a while now I was wondering if there is a fix for this? Isnt it strange that The field yml doesnt have a uuid? And is it possible to change this in de database manually? – Joost Jul 1 '17 at 7:22
  • Hm, I don't have an answer for that. I've never encountered anything like that before. – greg_1_anderson Jul 1 '17 at 23:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.