Related Content
Drupal 11: Finding A Better Way To Display Code Examples
I've been running this site for about 18 years now and the code I post has been in much the same format since it was started. The code is rendered onto the page using a <code> element and (mostly) syntax highlighted using a JavaScript plugin.
Drupal 11: Theming The Search API Search Input
A common request I see when theming Search API forms is to swap out the normal submit element with a magnifying glass icon. Performing this action isn't difficult, but it does require adding a couple of operations to add a suggestion so a custom template can be used.
Drupal 11: Controlling LED Lights Using A REST Service
Following on from my article looking at the Pimoroni Plasma 2350 W I decided to do something interesting with the Wifi interface that would connect to a Drupal site.
Drupal 11: How To Alter Entity View Builder Configuration Before Rendering
I encountered an issue on a Drupal 11 site recently where I had a block that was rendering an entity to display on a page.
DrupalCamp Scotland 2025
This year, DrupalCamp Scotland was held on the 7th November, at the University of Edinburgh.
On the morning of the conference I made the quick walk from by bed and breakfast and arrived at 50 George Square to join in with around 60 attendees to a day of talks and chatting.
Drupal 11: Programmatically Change A Layout Paragraphs Layout
The Layout Paragraphs module is a great way of combining the flexibility of the layout system with the content component sytem of the Paragraphs module.

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