I have two site with the same Uuid
SiteA and SiteB

SiteA is fresh installation and export its configuration, all siteA is under git.
drush config-export myfolder -y where my folder is where I store my configuration

SiteB is clone of siteA and it has the same uuid of SiteB
drush config-import myfolder -y
I get this error

Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in Drupal\Core\Config\ConfigImporter->validate() (line 730 of                     [error]
/Users/fabrer/Workspace/mvb/application/core/lib/Drupal/Core/Config/ConfigImporter.php).
The import failed due for the following reasons:                                                                                                                                       [error]
Entities exist of type <em class="placeholder">Shortcut link</em> and <em class="placeholder"></em> <em class="placeholder">Default</em>. These entities need to be deleted before
importing.

Comments

golddragon007’s picture

I have now the exactly same errors, do you know what can cause it?

dxvargas’s picture

I went to Home > Administration > Configuration > User interface > Shortcuts (admin/config/user-interface/shortcut), than in "List links" of "Default" I deleted every shortcut.
The error is gone now.

na.karimi’s picture

It works, but way when it not included in the config files, it affects the import process?

edysmp’s picture

For:

Entities exist of type Shortcut link and Default. These entities need to be deleted before importing.

You can do:
drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();'

DanieleN’s picture

@dxvargas
Has worked fine.

@edysmp
This have broked my site, but i don't know why...

marcelovani’s picture

I cannot run the drush command because the error happens during drush site-install when I specify the folder to sync

drush si -y standard --config-dir=../config/sync

Technical Architect at Acquia

geerlingguy’s picture

If you clear out the UUID inside shortcut.set.default.yml and replace it with null (so the line reads uuid: null), then this should work fine. Not sure why only the Shortcut set is broken in this case, but it made my CI builds work correctly again.

__________________
Personal site: www.jeffgeerling.com

deminy’s picture

The Drush code broke my Drupal site. I fixed the break by uninstalling/enabling module shortcut, however, there is no way to import previous site configurations any more. Some errors like following logged:

Error: Call to a member function getShortcuts() on null in /var/www/drupal8/www/core/modules/shortcut/shortcut.module on line 262 #0 /var/www/drupal8/www/core/modules/shortcut/shortcut.module(388): shortcut_renderable_links()

ByronNorris’s picture

Here's a link to the bug report in the D8 issue queue: Shortcut: Errors validating the config synchronization

sgourebi’s picture

You need to Home > Administration > Configuration > User interface > Shortcuts or (admin/config/user-interface/shortcut), then in "List links" of "Default" delete every shortcuts.

I try it and it works

auxiliaryjoel’s picture

is this on the localhost (working) end or the cpanel ("...encountered an unexpected error") end that I should be changing the User Interface shortcuts?

I'm hoping it's the localhost side, because currently my live server won't let me access any admin or front end areas.

sgourebi’s picture

It is in your drupal administration panel.

auxiliaryjoel’s picture

And should I be changing this on the local side that I can access,

and then re-exporting my config, and re-uploading it via git/drush to my cpanel?

sgourebi’s picture

Do it on your target website before importing new configs.

auxiliaryjoel’s picture

My target website broke when I pulled my updated localhost via github repo,

so this thread suggested that I should import my config:
https://www.drupal.org/forum/support/upgrading-drupal/2019-04-13/git-pul...

Following the steps mentioned from Jaypan gave me some more errors,
but either way I have no access to admin area on the live server. I've used drush to tell the cPanel what the correct UUID is (see my comments on the thread link above) but the error about "shortcut links"...etc. still persists.

so how do I 'fix' the live server without Drupal Admin access?

auxiliaryjoel’s picture

Hi sgourebi I did a Backup Restore on my cpanel so that I could get the functioning Drupal site to load again.

Once in there, I removed the shortcuts, and was able to do the config import "drush cim"

Now the issue I have is that the cpanel site is not acknowledging any of the css that is in my theme, even though it was present in the git repo and I can see it in my cpanel folder directories?

auxiliaryjoel’s picture

UPDATE:

for some reason my github repo was updating but my live server was not obtaining up to date libraries.yaml etc.

Running git pull origin master on my cpanel listed my config/sync files as being untracked changes in the tree. so I deleted these from cpanel.

After deleting these, more files were listed in the git pull as also being untracked (module directories, and vendor files). I removed all listed files as per what the git pull error list flagged.

I then did another git pull and my files all updated correctly from the git repo.

Then, as a test I ran a Drupal Core update (via composer) on my localhost as one was due.

I then git add/committed any appropriate file changes this caused and pushed it to my github repo,

and git pulled it to my cpanel.

This update was visible on my cpanel after "drush cr" so it appears to be working ok now.

MikeJones’s picture

I ran into this issue also and none of the above fixed the problem.

I realized there was a piece of content of the flagged content type that was causing the issue. Once I manually deleted that content I was able to run the Configuration Import successfully.

Skymen’s picture

For drush 9+ before import configs run:

drush entity:delete shortcut_set
igorgoncalves’s picture

thanks @skymen

yogeshmpawar’s picture

it worked like a charm. Thanks @skymen

suparnaa.dey’s picture

Its broke my site. Fixed the break by uninstalling/enabling the module shortcut.

ressa’s picture

For me as well, I had to run these two commands:

drush entity:delete shortcut_set
drush un shortcut

I always see this when I import config from another site into a fresh install, and then "Site UUID in source storage does not match the target storage.". The solution is to copy the UUID from the config file system.site.yml and setting it with this:

drush config:set system.site uuid "f20ab06e-f2bd-4a9a-a350-72e80db2507d" -y

Then, you can run drush config:import.

Maybe from Drupal 11 this won't be necessary?

smulvih2’s picture

I was running into this problem on one of my sites installing from config. I was able to solve the issue by setting the shortcut.set.default UUID to the proper value before importing config.

Get the UUID value from site:

drush cget shortcut.set.default uuid

Set the UUID value before installing from config:

drush si ...
drush cset shortcut.set.default uuid [UUID_VALUE] --yes
drush cim

ydahi’s picture

Thank you, this seems like the most sane approach in Drupal 10.

Pemson18’s picture

change uuid of config file shortcut.set.default.yml in your config dir to the current site uuid and then config import
 

To get current system site uuid

drush config-get "system.site" uuid