Customer bought a theme that has Commerce plugin installed with sample data. Anxious to get running and try out the new configuration system, I did what I do prior to Drupal 8.6. Commit everything but sensitive info into git and cloned to my local, dumped the MySql db. After getting the index page, every page returns a 500 error. One is Attempt to create a field commerce_remote_id that does not exist on entity type user despite the commerce_remote_id table in existence. The entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() in another. Drag copying all files from modules/commerce, modules/profile should get me past these errors. drush updb returns no updates needed. drush cr offers no relief. OK, I wanted to start using the new configuration system. On customer site drush cex and committed to git. On my local after git pull, drush cim returns:

This import is empty and if applied would delete all of your configuration, so has been rejected.

As I research this, it appears that drush will not import, but prefer to use drush site:install with an existing configuration. OK, the strong imperative within the community is to use composer to do a new site install. Can drush 9.5.2 install a new site onto itself using the existing settings.php file? I would like to get the sync configuration files working so that I can remove that as a factor to resolve my local site being hosed.

I read in another tutorial that the UUID must be copied over because if the customer and my local are to have the configuration work together that the UUID in system.site.yml must match. I can confirm that they do match. drush config.get system.site returns the UUID that the source Drupal install is using.

  • Is it configured to point at the right config directory so Drush knows where to look for it?
    – Kevin
    Jan 12 '19 at 15:30

Do double check the directory where the config files are located. The directory is set in settings.php like:

$config_directories['sync'] = 'sites/default/files/[...]/sync';

I had the same issue but moving the config directory to the correct place solved it.

  • do the export to that folder first, then cim works properly drush cex sync
    – Solomon
    Feb 21 '20 at 16:55

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.