Related Content
Drupal 10: Running Drupal Tests On GitHub Using Workflows
There are a number of different tools that allow you to validate and test a Drupal site. Inspecting your custom code allows you to adhere to coding standards and ensure that you stamp our common coding problems. Adding tests allows you to make certain that the functionality of your Drupal site works correctly.
DrupalCon Lille 2023
This year's DrupalCon Europe was hosted between the 17th and 20th of October, in the French city of Lille. My DrupalCon adventure began early on Monday morning when Chris Maiden picked me up to drive to France via the EuroStar train. We arrived in Lille a little after 4pm, which was really good going for a nearly 400+ mile trip.
Drupal 10: Adding Third Party Settings To Drupal Configuration Entities
Drupal's modular system allows for all kinds of additions to be added to your site through plugins, entities and configuration.
Drupal 10: Adding Custom Permissions To Groups
The Group module in Drupal is a powerful way of collecting together users and content under a single entity.
Drupal 10: Creating A Notification System Using The Message And ECA Modules
Drupal is a great platform to create communities of users where you can allow users to create their own content and interact with each other. One way of keeping users engaged on the site is by letting them know when other users are interacting with content they have created.
Drupal 10: Using Default Content Deploy To Create Testing Content
Performing behavioural testing on a Drupal project allows you to make sure that all of your features work as they should do. This is especially important when you update code as this can introduce bugs that are otherwise time consuming or difficult to spot.
Comments
I would not advise to do this. I'm not sure if it works on Drupal 8, but it definitely does NOT work on Drupal 9+ websites. I attempted to do this on a new website I just created, to see if the process works. I exported the config of a Drupal 9 website I created a few weeks ago and imported it in the new Drupal 9 website, after changing the site ID in the exported config bundle.
What seems to have happened when I tried it:
Indeed, Drupal check the site ID system.site.yml file, but it also uses the IDs in every other files. If an entity exists in Drupal but is not present in the import (i.e. it can not find its ID in the import), Drupal will delete the entity on the website. Since every single entities in Drupal have a different ID from the one in the import, Drupal attempts to delete every single entities before creating the new one. Unfortunately, Drupal can't function without any entities, so it dies and can't perform the import, leaving you with a broken website.
Submitted by Gael Lafond on Tue, 02/22/2022 - 09:03
PermalinkThanks for the information Gael.
I wonder if the effect you are seeing in Drupal 9+ is something do to with Configuration 2.0? Sounds like not only would you need to alter the main site ID, but also the uuid of every item of configuration in your site.
I have to admit that this technique is a bit of an edge case, but it sometimes got me out of certain situations in Drupal 8. Situations created by certain local development environments that I wont mention here.
Submitted by philipnorton42 on Tue, 02/22/2022 - 09:11
PermalinkJust ran on a new Drupal 9 install as part of trying to instal a themeforrest theme. Found the same problem as commented by Gael.
In th eINSTALL directory of the unzipped theme is 485 yml config files.
How is one supposed to import the config?
Submitted by Chris Chaplow on Tue, 11/01/2022 - 15:01
PermalinkTo the hashbangcode.com webmaster, Thanks for the well-written and informative post!
Submitted by Adelaida Keble on Mon, 02/06/2023 - 00:30
PermalinkAdd new comment