TL; DR Drupal 10 Upkeep and Help Service Config overrides appear very helpful, however will be fairly problematic when used for config entities. In case you are utilizing them on this approach, you must make very certain that there are not any unintended unwanted side effects. And for those who keep a contrib Drupal 10 module that defines a config entity kind, you must be certain they’re protected to make use of with config overrides. Honest warning Drupal 10 Upkeep and Help Service This weblog put up is principally written for builders. Whereas, ideally, website builders who wish to use configuration overrides must also perceive Drupal Development Company inherent issues they arrive with, I do not really feel it is doable to essentially clarify these issues with out getting fairly technical. What are config overrides? When you’re not conversant in 8’s idea of configuration overrides, I recommend you shortly learn up on it in Drupal Development Company documentation on Drupal 10.org. Briefly, it permits you to outline overrides for configuration (who would have thought?) in your settings.php, making it simple to have totally different settings for various environments – quite common, after all, in case you have separate development or testing environments. Drupal Developer approach these overrides work ought to be correctly understood, although Drupal 10 Upkeep and Help Service Drupal Development Company overrides exist solely in Drupal Development Company code, are learn into a worldwide variable at Drupal Development Company begin of Drupal Development Company web page request after which, when a configuration merchandise is accessed throughout a web page request that world variable is checked for overrides to that particular configuration merchandise. In different phrases, Drupal Development Company config values in Drupal Development Company database (or Drupal Development Company config storage, if that is not Drupal Development Company database in your case) ought to by no means include Drupal Development Company overridden values, these ought to solely ever be current in settings.php. To facilitate this, config objects when usually loaded are at all times read-only – that approach, Drupal Development Company overrides loaded with them will not be written again to Drupal Development Company database. If you wish to edit some config values, it’s essential explicitly load Drupal Development Company config merchandise with Drupal 10 Upkeep and Help Service Drupal 10 Upkeep and Help ServiceconfigFactory()->getEditable(‘your_config.identify’); to acquire a writable copy – which then will come with none overrides. This ensures that, as mentioned earlier than, no overrides will probably be written again to Drupal Development Company storage. Then what’s Drupal Development Company drawback? Whereas this getEditable() requirement for modifying configuration works fairly properly, there may be one large drawback Drupal 10 Upkeep and Help Service this requirement, and complete “read-only” system, is simply not there for config entities! Once you load a config entity, though it is principally only a config merchandise with a category, it should at all times be writable – there is not even a option to explicitly get a read-only model. There may be loadOverrideFree() on ConfigEntityStorage, which you must completely use when making any probabilities to a config entity – however who actually is aware of that? (I did not, and I hope for causes of self-importance that I am not Drupal Development Company just one.) Drupal Developer sensible folks engaged on Core after all shortly realized this. Their answer Drupal 10 Upkeep and Help Service on admin pages (that are already categorized as such to permit having an “admin theme”), the place entities are normally edited, at all times load Drupal Development Company override-free model of Drupal Development Company entity for Drupal Development Company route controller. That approach, Drupal Development Company edit will actually solely have an effect on Drupal Development Company values in Drupal Development Company storage, and Drupal Development Company overrides will not be touched in any respect. This results in a slight UX WTF, however is usually a superb answer, which works in numerous circumstances. Drupal Developer drawback, although, is that it is from working for all of them. Additionally, because it’s working in lots of circumstances, we’d really feel it is much less pressing to level this potential drawback out to contrib Drupal 10 module builders and website builders. So, what issues stay? Good of you to ask! In my view, there are nonetheless a number of remaining issues. Whereas I am unsure that each one of them may even be mounted in Core, and it would definitely take some time (because it almost at all times does – particularly for such difficult points), I feel Drupal Development Company major factor is to at the least educate builders and website builders alike that these issues exist, and possibly the best way to spot them. Right here is an summary of all issues I am conscious of Drupal 10 Upkeep and Help Service Config entities aren’t at all times edited on admin pages Whereas making use of this repair for all admin pages is definitely a superb heuristic, I am fairly certain there are contrib Drupal 10 modules on the market that save config entities on non-admin pages. When that occurs, Drupal Development Company consumer will (not like anyplace else in 8) truly see Drupal Development Company overridden values whereas modifying, and they are going to be saved again to Drupal Development Company database/storage, which we do not need. So, for those who keep a contrib Drupal 10 module, make sure to at all times load Drupal Development Company override-free model of a config entity earlier than modifying and saving it! This particularly applies to Drush instructions, the place Drupal Development Company generic repair for admin pages after all would not apply – except you explicitly request it in any other case, you may at all times get Drupal Development Company overridden entity there. Admin pages do not at all times load config entities only for modifying Drupal Developer reverse can be true Drupal 10 Upkeep and Help Service generally, admin pages will simply present details about a sure config entity, not enable any modifying. On this case, presently, Drupal Development Company overridden values won’t be displayed, probably complicated customers. In some circumstances, they’re going to not be capable of see anyplace that Drupal Development Company overridden values are literally utilized accurately. Extra of an issue, although, are different non-editing makes use of of config entities, which was considered one of Drupal Development Company two major issues we confronted in Drupal Development Company Search API Drupal 10 module (see Drupal 10 website positioning #2682369 Drupal 10 Upkeep and Help Service Repair issues with overridden config entities) Drupal 10 Upkeep and Help Service in our case, almost all of Drupal Development Company Drupal 10 module’s UI (besides most searches) is definitely on admin pages, and can due to this fact (so long as Drupal Development Company config entity is loaded immediately by Drupal Development Company route controller – additionally a peculiar supply of potential confusion, see subsequent heading) use Drupal Development Company override-free model. Whereas that is nice for Drupal Development Company edit pages, it is disastrous for Drupal Development Company different performance obtainable there – “Index now”, “Clear listed information”, and so forth., would all use Drupal Development Company entities with out overrides. When you used config overrides to make Drupal Development Company index read-only, or to connect them to a unique search server, this might imply your manufacturing website’s server might be corrupted or cleared by actions in your development website – not superb, in brief. Fortunately, when you’re conscious of this drawback, there’s truly a fairly simple answer Drupal 10 Upkeep and Help Service you’ll be able to simply use Drupal Development Company with_config_overrides parameter possibility in your MODULE.routing.yml file to get Drupal Development Company overridden model of a config entity even on an admin web page. That approach, on pages the place you wish to do one thing else than edit/save Drupal Development Company config entity, you may get Drupal Development Company appropriate model of Drupal Development Company entity, with Drupal Development Company efficient values. It is barely extra difficult on pages the place you’ll be able to each edit an entity and use it in another approach. In that case, merely select considered one of Drupal Development Company two to request by way of Drupal Development Company route controller after which manually re-load Drupal Development Company different model, with/with out overrides, when acceptable. Entities aren’t at all times loaded by Drupal Development Company route controller It is necessary to notice that Drupal Development Company talked about repair for admin pages is put in (please appropriate me right here if I am unsuitable) in Drupal Development Company route controller. So, when Drupal Development Company config entity in query is a part of Drupal Development Company URL (for example, admin/construction/sorts/handle/<var>{node_type}</var>), it should (by default) be loaded with out overrides, however loading it usually inside a web page callback or kind builder technique will yield Drupal Development Company regular entity, with overrides. That is largely not even a bug, however a function Drupal 10 Upkeep and Help Service for many entity edit pages, Drupal Development Company entity is in Drupal Development Company URL, whereas (for example) overview pages will do a bulk-load and get Drupal Development Company overridden values. Nonetheless, together with Drupal Development Company earlier merchandise, about displaying config entities on admin pages, it may result in complicated conditions for customers Drupal 10 Upkeep and Help Service an summary web page for Drupal Development Company entities would use Drupal Development Company overridden values, whereas clicking by way of to a “View” web page for considered one of them would all of the sudden present Drupal Development Company override-free model of that entity. And since (see Drupal Development Company UX WTF above) we by no means truly present any indication in Drupal Development Company UI about which values are overridden, Drupal Development Company consumer may truly marvel which ones are Drupal Development Company efficient ones. Drupal Developer actually difficult drawback To this point, Drupal Development Company major drawback was simply being conscious of Drupal Development Company numerous issues that might happen. When you’re conscious that they exist, they’re all truly fairly simple to resolve – simply see whether or not or not you save a config entity, and in both case be sure you load Drupal Development Company acceptable model of it. Nonetheless, there may be one final drawback with overridden config entities, and this one is an actual doozy – a lot too advanced to place in a heading, for certain. I might say that it’ll fortunately solely have an effect on a minority of Drupal 10 modules coping with config entities, however the place it strikes it is arduous to identify, and is perhaps even tougher to repair. It is also what brought on most of Drupal Development Company work in Drupal Development Company Search API subject talked about above. Let’s take Drupal Development Company Search API as Drupal Development Company instance and suppose you may have an index with an overridden server Drupal 10 Upkeep and Help Service “server1” in Drupal Development Company database, “server2” as Drupal Development Company overridden worth. Now, you edit Drupal Development Company index and alter one thing else – Drupal Development Company description, for instance. For modifying, after all, Drupal Development Company override-free entity model is used, all appropriate. Upon saving, although, Drupal Development Company storage controller masses Drupal Development Company earlier entity model as Drupal Development Company “unique” – however this time with overrides. So, though solely Drupal Development Company description was modified, from inside hook_entity_update() and Drupal Development Company entity’s postSave() technique it should seem like Drupal Development Company server was modified from “server2” to “server1”. On this case, Drupal Development Company Search API will take away all of Drupal Development Company index’s information from “server2” (the place it ought to have remained) and initialize information constructions for it on “server1” (the place they will not be used), in all probability breaking all searches for that index to at the least some extent (relying on backend). Comparable issues exist for “read-only” flags and different properties, and modifying Drupal Development Company precise property that’s overridden after all results in yet one more set of issues. I am blissful to say that I am assured we resolved all of those issues for Drupal Development Company Search API (although, as talked about earlier than, I might respect it if website house owners who is perhaps affected may totally take a look at this for his or her website, with Drupal Development Company latest Beta launch), but it surely’s sadly very seemingly that there are different contrib Drupal 10 modules that also have such issues, and won’t even concentrate on them. Drupal Developer Core subject I created for this drawback is that this one Drupal 10 Upkeep and Help Service Drupal 10 website positioning #2744057 Drupal 10 Upkeep and Help Service Inconsistencies when updating overridden config entities. Nonetheless, I feel it has truly centered extra round Drupal Development Company drawback of reliably fixing Drupal Development Company different issues listed above, by bringing Drupal Development Company “immutable/editable” answer that is in place for regular config objects to config entities, too. (I is perhaps mistaken, although – I frankly admit that Drupal Development Company complexity of this subject offers me complications.) Additionally necessary, certain, but it surely would not contact this final, truly arduous drawback, so far as I am conscious. (Whereas Drupal Development Company others are arguably additionally fairly arduous to resolve generically in Core, they’re simple sufficient to work round in contrib Drupal 10 modules utilizing config entities, so long as you’re conscious of them.) I am presently not even certain {that a} generic answer for this final drawback is de facto possible. Due to this fact, it is all Drupal Development Company extra necessary for Drupal 10 module builders, I feel, to bear in mind that this drawback exists and to rigorously search their very own code for locations the place one thing like this would possibly occur. To cite swentel Drupal 10 Upkeep and Help Service Rattling, overrides are actually not a protected factor in any respect. Coda I hope I may assist at the least a few of you perceive Drupal Development Company advanced issues with config entity overrides, and possibly on this approach assist uncover and repair some bugs. In any case, many due to Alumei for first bringing this drawback to my consideration, patiently explaining it quite a few occasions till I lastly understood it, and even fearlessly tackling Drupal Development Company Core subject to attempt to repair this for everybody else. Picture credit score Drupal 10 Upkeep and Help Service showbiz children Drupal 10 Improvement and Help
drunken monkey Drupal 10 Upkeep and Help Service Drupal Developer issues with config entity overrides

Call Us: 1(800)730-2416
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit
Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)
drunken monkey Drupal 10 Upkeep and Help Service Drupal Developer issues with config entity overrides
On-Site Drupal SEO Master Setup
We make sure your site is 100% optimized (and stays that way) for the best SEO results.
With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.
This service includes:
- Pathauto install and configuration for SEO-friendly URLs.
- Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
- Install and fix all issues on the SEO checklist module.
- Install and configure XML sitemap module and submit sitemaps.
- Install and configure Google Analytics Module.
- Install and configure Yoast.
- Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
- Install and configure Schema.org Metatag.
- Configure robots.txt.
- Google Search Console setup snd configuration.
- Find & Fix H1 tags.
- Find and fix duplicate/missing meta descriptions.
- Find and fix duplicate title tags.
- Improve title, meta tags, and site descriptions.
- Optimize images for better search engine optimization. Automate where possible.
- Find and fix the missing alt and title tag for all images. Automate where possible.
- The project takes 1 week to complete.
