I've been playing around with D8 and have managed to break a few things I can't figure out how to fix. Most recently, after installing (via manually adding the module code to the modules folder) the Name Field module and subsequently enabling it in the Admin panel, my Drupal 8 instance started throwing fatal PHP errors. No problem, I thought, apparently the module has a bug and I'll just remove it for now. Not so easy. I removed the module folder from my instance, but the errors are persisting.

Not that the specific error matters as this question is not about troubleshooting the module, but here's an example of something I get after removing the module code:

Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginException: "Plugin (name) instance class "Drupal\name\Element\Name" does not exist." at /srv/http/drupal.protestan.org/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php line 87

Is there a way to disable a malfunctioning module without being able to load the control panel? I've looked around but all the hacks for D6/D7 including tweaking the database manually don't seem to apply any more. At the very least the layout has changed and I was unable to find the corresponding bit to toggle. Likewise the current version of drush does not seem to be able to cope with D8 yet.

Is my whole database borked? Is there a secret URL or other way to load the Admin panel with no modules enabled (i.e. some sort of safe mode)?

  • Did you uninstall the module before deleting its folder?
    – apaderno
    Commented Feb 14, 2015 at 9:36
  • @kiamlaluno No. I didn't know how to do that—as it was crashing the core Drupal code I could not access the admin pages to uninstall it. If there is a way to do so without access to admin then I can put the code back and do so—that would answer this question I suppose.
    – Caleb
    Commented Feb 14, 2015 at 9:39
  • Can you run Drush? The alternative would be to let Drupal understand you removed the module, so that it can remove any references to the classes that module implements.
    – apaderno
    Commented Feb 14, 2015 at 9:45
  • @kiamlaluno See question body, but at least the version of drush I have appears to have no effect on anything in a D8 instance. It runs but gives no feedback for any commands (silent fail? perhaps it's impacted by the above problem as well?).
    – Caleb
    Commented Feb 14, 2015 at 9:48

2 Answers 2


We were having the similar issue. We were not able to uninstall the module from Drush or from Module Uninstall interface as it was throwing errors due to code in hook_uninstall().

The 'acquia_search_multi_subs' module was giving error in our case during uninstall and data in table looks like below,

drush sqlq "select * from config where name='core.extension'"

core.extension  a:2:{s:6:"module";a:74:{s:16:"acquia_connector";i:0;s:13:"acquia_search";i:0;s:24:"acquia_search_multi_subs";i:0;s:13:"admin_toolbar";i:0;s:19:"admin_toolbar_tools";i:0;s:5:"block";i:0;s:13:"block_content";i:0;s:10:"breakpoint";i:0;s:8:"ckeditor";i:0;s:6:"coffee";i:0;s:7:"comment";i:0;s:16:"composer_manager";i:0;s:6:"config";i:0;s:7:"contact";i:0;s:15:"contact_storage";i:0;s:10:"contextual";i:0;s:6:"ctools";i:0;s:8:"datetime";i:0;s:5:"dblog";i:0;s:18:"dynamic_page_cache";i:0;s:6:"editor";i:0;s:26:"entity_reference_revisions";i:0;s:6:"facets";i:0;s:5:"field";i:0;s:8:"field_ui";i:0;s:4:"file";i:0;s:6:"filter";i:0;s:5:"image";i:0;s:13:"layout_plugin";i:0;s:4:"link";i:0;s:17:"menu_link_content";i:0;s:7:"menu_ui";i:0;s:7:"metatag";i:0;s:18:"metatag_open_graph";i:0;s:7:"migrate";i:0;s:14:"migrate_drupal";i:0;s:12:"migrate_plus";i:0;s:13:"migrate_tools";i:0;s:15:"migrate_upgrade";i:0;s:4:"node";i:0;s:7:"options";i:0;s:10:"page_cache";i:0;s:12:"page_manager";i:0;s:15:"page_manager_ui";i:0;s:6:"panels";i:0;s:10:"paragraphs";i:0;s:4:"path";i:0;s:9:"quickedit";i:0;s:3:"rdf";i:0;s:11:"rdf_builder";i:0;s:5:"rdfui";i:0;s:16:"responsive_image";i:0;s:10:"search_api";i:0;s:15:"search_api_solr";i:0;s:15:"security_review";i:0;s:9:"sharethis";i:0;s:14:"simple_sitemap";i:0;s:6:"system";i:0;s:8:"taxonomy";i:0;s:9:"telephone";i:0;s:4:"text";i:0;s:5:"token";i:0;s:7:"toolbar";i:0;s:6:"update";i:0;s:4:"user";i:0;s:10:"zzz_common";i:0;s:11:"zzz_migrate";i:0;s:11:"zzz_zipcode";i:0;s:5:"views";i:0;s:8:"views_ui";i:0;s:20:"workbench_moderation";i:0;s:7:"youtube";i:0;s:8:"pathauto";i:1;s:6:"aaazzz";i:1000;}s:5:"theme";a:6:{s:5:"stark";i:0;s:6:"stable";i:0;s:6:"classy";i:0;s:5:"seven";i:0;s:6:"bartik";i:0;s:11:"zzzmagazine";i:0;}}


To uninstall the module, we run following sql statement on d8 database. Basically we removed s:24:"acquia_search_multi_subs";i:0; from 'data' field and reduced the length of the array to 73 in our case.

drush sqlq "update config set data = 'a:2:{s:6:\"module\";a:73:{s:16:\"acquia_connector\";i:0;s:13:\"acquia_search\";i:0;s:13:\"admin_toolbar\";i:0;s:19:\"admin_toolbar_tools\";i:0;s:5:\"block\";i:0;s:13:\"block_content\";i:0;s:10:\"breakpoint\";i:0;s:8:\"ckeditor\";i:0;s:6:\"coffee\";i:0;s:7:\"comment\";i:0;s:16:\"composer_manager\";i:0;s:6:\"config\";i:0;s:7:\"contact\";i:0;s:15:\"contact_storage\";i:0;s:10:\"contextual\";i:0;s:6:\"ctools\";i:0;s:8:\"datetime\";i:0;s:5:\"dblog\";i:0;s:18:\"dynamic_page_cache\";i:0;s:6:\"editor\";i:0;s:26:\"entity_reference_revisions\";i:0;s:6:\"facets\";i:0;s:5:\"field\";i:0;s:8:\"field_ui\";i:0;s:4:\"file\";i:0;s:6:\"filter\";i:0;s:5:\"image\";i:0;s:13:\"layout_plugin\";i:0;s:4:\"link\";i:0;s:17:\"menu_link_content\";i:0;s:7:\"menu_ui\";i:0;s:7:\"metatag\";i:0;s:18:\"metatag_open_graph\";i:0;s:7:\"migrate\";i:0;s:14:\"migrate_drupal\";i:0;s:12:\"migrate_plus\";i:0;s:13:\"migrate_tools\";i:0;s:15:\"migrate_upgrade\";i:0;s:4:\"node\";i:0;s:7:\"options\";i:0;s:10:\"page_cache\";i:0;s:12:\"page_manager\";i:0;s:15:\"page_manager_ui\";i:0;s:6:\"panels\";i:0;s:10:\"paragraphs\";i:0;s:4:\"path\";i:0;s:9:\"quickedit\";i:0;s:3:\"rdf\";i:0;s:11:\"rdf_builder\";i:0;s:5:\"rdfui\";i:0;s:16:\"responsive_image\";i:0;s:10:\"search_api\";i:0;s:15:\"search_api_solr\";i:0;s:15:\"security_review\";i:0;s:9:\"sharethis\";i:0;s:14:\"simple_sitemap\";i:0;s:6:\"system\";i:0;s:8:\"taxonomy\";i:0;s:9:\"telephone\";i:0;s:4:\"text\";i:0;s:5:\"token\";i:0;s:7:\"toolbar\";i:0;s:6:\"update\";i:0;s:4:\"user\";i:0;s:10:\"zzz_common\";i:0;s:11:\"zzz_migrate\";i:0;s:11:\"zzz_zipcode\";i:0;s:5:\"views\";i:0;s:8:\"views_ui\";i:0;s:20:\"workbench_moderation\";i:0;s:7:\"youtube\";i:0;s:8:\"pathauto\";i:1;s:6:\"aaazzz\";i:1000;}s:5:\"theme\";a:6:{s:5:\"stark\";i:0;s:6:\"stable\";i:0;s:6:\"classy\";i:0;s:5:\"seven\";i:0;s:6:\"bartik\";i:0;s:11:\"zzzmagazine\";i:0;}}' where name='core.extension'"


Please make sure to take the backup of the table before executing such commands as if something goes wrong then you won't be able access the site.


You seem to be having two issues: this module (i.e. PHP Fatal Errors resulting from something that's broken in the module) and Drush.

Let's start by the easiest fix, Drush.

Make sure you have Drush 8 (or 9-dev), which is the only version compatible with Drupal 8. Run $ drush --version to know for sure. If you're not running Drush 8, then, read the documentation and install it via Composer.

As to your module issue, my best bet at this point would be to put the module back in place where it was so that Drupal can see it, else, it'll never be in a position to trigger the uninstall process if the module isn't there. Once it's back (under the /modules directory at the root of your Drupal install), run the $ drush pm-uninstall -y command which will not disable the module (this has been removed completely from D8) but uninstall it completely. If it doesn't fail during the process, then, chances are that everything will be fine. If you do have issues during the uninstall phase, try to visit the /admin/modules/uninstall page to uninstall the module from the UI (assuming something didn't work well with Drush).

If nothing works, try to rebuild the cache (/admin/config/development/performance or $ drush cr) and repeat the above operation. Finally, if you're still stuck, I'd advise you report your bug (at the very least the PHP error message) in the module's issue queue. Note that it should not be the error you mentioned earlier since you got it after you removed the module from its original location.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.