Updated: Comment #30
Problem/Motivation
As Drupal 8 is tested by more and more people, including contributed module developers, there have been a variety of cases where sites are put into an unrecoverable state, or Drupal breaks badly or with baffling/seemingly irrelevant error messages, following minor changes or bugs.
The goal of this issue is to track specific bugs or other examples of brittleness, in order to look for best practices or architectural solutions that will reduce brittleness in Drupal 8.
A definition for brittleness:
In computer programming and software engineering, software brittleness is the increased difficulty in fixing older software that may appear reliable, but fails badly when presented with unusual data or altered in a seemingly minor way. The phrase is derived from analogies to brittleness in metalworking.
Proposed resolution
Most of the initial list of issues were uncovered during "port your module to D8" sessions. They do not relate to the same sub-systems, and they will likely require a range of different fixes.
#2097189: Add a rebuild script made a certain subset of errors more recoverable, but that is only one portion of the problem space.
Please continue to add any issues with examples of D8 brittleness to this issue summary.
Remaining / Related issues
#1567500: [meta] Pave the way to replace the testing framework with PHPUnit and possibly rewrite Simpletest
#1881630: [meta] Determine how to respond to invalid plugins (plugin dependencies)
#1908310: Drupal without DB but with site config throws uninformative error
#1962876: Misleading error message: Symfony ServiceNotFoundException: You have requested a non-existent service
#1969698: ConfigEntity::save() should disallow saving ID/UUID conflicts (Field UUID changes can badly corrupt field data)
#2004086: The Request service must be synthetic
#2007248: When CKEditor module is uninstalled, the right text editor config entities are affected but their labels are missing
#2057259: Malformed modulename.info.yml file causes fatal error
#2076411: Remove the request scope from the current user service
#2084197: Uninstalling menu module removes all custom menus
#2084521: Improve error handling of \Drupal class
#2095155: Fatal error does not cause the site to break if it happens outside of the main content
#2113913: "The plugin did not specify an instance class" when the plugin does not exist is confusing Assigned to: xano
#2116377: Make .info.yml syntax errors tell you where they come from; also non-required modules shouldn't break the installer
Original report by [username]
Posted by xjm on September 9, 2013 at 11:09pm
There are lots of ways in Drupal 8 to break your site such that you can never recover, or such that it's not clear how to recover. In a lot of cases, specific bugs get resolved, but the overall architectural problems that lead to the situation aren't tracked.
This issue is for tracking those problems and hopefully resolving the underlying issues that cause them to crop up.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | images.jpeg | 9.54 KB | larowlan |
Comments
Comment #1
xjm#2084197-24: Uninstalling menu module removes all custom menus includes an example, as does #1969698: ConfigEntity::save() should disallow saving ID/UUID conflicts (Field UUID changes can badly corrupt field data).
Comment #2
larowlan#2007248: When CKEditor module is uninstalled, the right text editor config entities are affected but their labels are missing
Comment #3
larowlan#1881630: [meta] Determine how to respond to invalid plugins (plugin dependencies)
Comment #4
catchWhile it's not a runtime issue, re-installing a site has a lot more steps than Drupal 7 did, and when it breaks the error handling often doesn't tell you what the problem is.
For memory I've run into trouble doing the following:
- touch settings.php instead of copying default.settings.php
- not deleting config directories.
- not removing settings.php from a previous install (especially if it has config directories in it that aren't there any more).
- not removing the compiled container from PHP storage
Comment #5
pwolanin commentedI'm seeing an interesting fail now after I tried to hand-truncate the cache tables.
I've cleared the PHP storage and re-truncated all the cache tables. Is there some other cache? Or something in a cache_* table that needs to be persisted?
As best I can tell I'll need to re-install now.
Comment #6
tim.plunkettThat would have been handled by an upgrade path if it was later in the cycle. I knowingly broke everyones installs by not writing a hook_update_N
Comment #7
pwolanin commentedoh, ok - well if that was expected, fine.
Comment #8
msonnabaum commentedPossibly related #2084521: Improve error handling of \Drupal class
Comment #9
pwolanin commentedIf you define the same route name 2x, e.g. in different yml files, core throws a fatal SQL error during the route dumping.
Not sure if this crosses the line into baby-sitting to catch it and show an message instead, but seems like the sort of thing you might hit often during development?
Comment #10
jhodgdonAppears to be a meta-issue not documentation though.
Comment #11
catch#2076411: Remove the request scope from the current user service / #2004086: The Request service must be synthetic.
Comment #12
pwolanin commentedThe change from route name "menu_menu_edit" to "menu.menu_edit" is potentially forcing a re-install. A menu link or something in the DB is looking up the old name and causing an uncaught exception:
I think we debated this before - doesn't seem like this should be fatal?
Comment #13
tim.plunkettI believe we discussed removing the route_name column from the {menu_link} table. @dawehner would know.
Comment #14
pwolanin commentedThat would seem a bit odd to remove it - then you'd have to run a more expensive matching operation every time you want to check access?
Comment #15
webchickThis needs someone else to reproduce who ideally isn't sleep-deprived, but the following seemed to happen to me:
1) Copy/paste your D7 module (such as https://drupal.org/project/pants) into your D8 modules directory in order to start porting.
2) Change your .info file to a .info.yml file without changing any of the text inside.
3) Go to the modules page.
4) Boom: YAML parse error.
5) Fix the YAML parse error.
6) Reload the modules page.
7) Your module still doesn't show up.
I tried clearing the caches with Drush, with the "Performance" button and no dice. No idea how to proceed without a reinstall. Any ideas?
EDIT: Ugh, missing type: module. Ignore me. Or maybe don't. :P This screwed me up a lot.
Comment #16
larowlanThat bit me once too, in my case I needed to add 'type: module' to the yml
Comment #17
larowlanoh, just saw the edit :) ignore me
Comment #18
larowlanSimpletest.

Running the same test twice locally can net different results with errors about mtimefilestorage.
#1567500: [meta] Pave the way to replace the testing framework with PHPUnit and possibly rewrite Simpletest
</endrant>Comment #19
chx commented#2097189: Add a rebuild script has a rebuild script.
Comment #20
berdir#1962876: Misleading error message: Symfony ServiceNotFoundException: You have requested a non-existent service
#2095155: Fatal error does not cause the site to break if it happens outside of the main content (Kind of the opposite, actually)
Also, our error handling in Twig is pretty bad. Often it gets something that it can't handle, e.g. a FieldItemList object (node.nid instead of node.id) it dies with a fatal error as it tries to call a method called printed(), or if you're lucky, you get an exception that doesn't really tell you anything. We *need* to improve that to give you the template and problematic placeholder.
Comment #21
xano#2113913: "The plugin did not specify an instance class" when the plugin does not exist is confusing
Comment #22
xjmFiled: #2116377: Make .info.yml syntax errors tell you where they come from; also non-required modules shouldn't break the installer
Comment #23
xjmswentel pointed out: #2057259: Malformed modulename.info.yml file causes fatal error
Comment #24
alexpott#1908310: Drupal without DB but with site config throws uninformative error is also an example of brittleness - if the db is not available the maintenance theme just does not work.
Comment #24.0
alexpottUpdated issue summary.
Comment #25
larowlanComment #26
sunI was pointed to this meta issue, but the (lack of an) issue summary as well as all existing comments didn't really help to clarify on the context and scope of this meta issue...
@timplunkett's more sane interpretation in IRC was:
So retitling accordingly.
That said, given that interpretation, #2155701: Installer starts with fatal error/exception "table 'semaphore' not found" if settings.php contains $databases already does not really fall into this bucket, as it's a bug at the exact opposite end: Once you run into one of the issues covered by this meta here, you want to re-install, but ugh, sad panda.
Comment #27
sun@chx asked me to revert the issue title (without stating a reason). Sorry.
Comment #28
pameeela commentedUpdated with issues from comments added as related issues.
Comment #29
chx commented> (without stating a reason).
Stop lying about what happens in IRC. That got both of us into deep trouble 1.5 years ago and I was very reluctant to talk to you again on IRC and I now put you on ignore and won't talk to you again.
Comment #30
kattekrab commentedI'm updating the issue summary to try to add a little more clarity around the nature of this issue.
There does appear to be some legitimate confusion about the nature of this meta issue and what it relates to - and as far as I can tell, that confusion was resolved with further conversation in IRC after the snippet shared in the previous comment.
I hope that by updating the issue queue to clarify it's scope, that others may better understand the broad "catch-all" purpose of this meta issue.
Comment #31
kattekrab commentedComment #32
tim.plunkettComment #33
kattekrab commentedComment #34
xjmThis issue is mainly for tracking and isn't actionable on its own, so switching to "revisit before release candidate". Please continue to add specific issues you find that show brittle failures in D8.
Comment #35
xjmComment #36
xjmComment #37
effulgentsia commentedTagging per #34.
Comment #38
catchUntagging, not being used for tracking either at this point.
Comment #39
catchGoing to go ahead and close this.
We still have plenty of examples of brittleness, but all the child issues here are closed.