Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By monkeyuser on
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
I have now the exactly same
I have now the exactly same errors, do you know what can cause it?
Fixed
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.
It works thanks
It works, but way when it not included in the config files, it affects the import process?
For:Entities exist of type
For:
You can do:
drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();'
@dxvargas
@dxvargas
Has worked fine.
@edysmp
This have broked my site, but i don't know why...
I cannot run the drush
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
If you clear out the UUID
If you clear out the UUID inside
shortcut.set.default.yml
and replace it withnull
(so the line readsuuid: 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
The Drush code broke my
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:
Link to the corresponding issue
Here's a link to the bug report in the D8 issue queue: Shortcut: Errors validating the config synchronization
Delete every shortcuts in your site
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
is this on the localhost
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.
It is in your drupal
It is in your drupal administration panel.
And should I be changing this
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?
Do it on your target website
Do it on your target website before importing new configs.
My target website broke when
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?
Hi sgourebi I did a Backup
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?
UPDATE:
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.
I ran into this issue also
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.
For drush 9+ before import
For drush 9+ before import configs run:
works like a charm
thanks @skymen
Thanks for solution
it worked like a charm. Thanks @skymen
Its broke my site. Fixed the
Its broke my site. Fixed the break by uninstalling/enabling the module shortcut.
Remove and uninstall shortcut
For me as well, I had to run these two commands:
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?
Set the UUID for shortcut.set.default
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
Thank you, this seems like
Thank you, this seems like the most sane approach in Drupal 10.
change uuid of config file
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