I installed the module ThemeKey, but the installation failed with a WSOD. Now every page gives me the same 'The website encountered an unexpected error'.

So I need to remove themekey, but how can I do so? The watchdog table doesn't include any message relating to this problem, so is no help. Can I disable/remove it via the database, or am I stuck with rebuilding the whole system?

  • 1
    Check your server logs (not the database). they'll have the real error in it. Kind of need to know what that error is to advise
    – Clive
    Jul 22 '16 at 8:28
  • Refer to drupal.stackexchange.com/questions/72927/…
    – RajneeshB
    Jul 22 '16 at 9:48
  • [Mon Jul 18 07:31:26.983226 2016] [:error] [pid 5390] [client] Uncaught PHP Exception Drupal\\Core\\Entity\\Exception\\InvalidLinkTemplateException: "Link template 'edit-form' for entity type 'themekey_rule' must start with a leading slash, the current link template is 'themekey_rule.edit'" at /data/www/shgc8/core/lib/Drupal/Core/Entity/EntityTypeManager.php line 89
    – davem
    Jul 22 '16 at 15:35
  • Preceding entry:[Mon Jul 18 07:32:14.392837 2016] [:error] [pid 5409] [client] PHP Fatal error: Class 'Drupal\\themekey\\Theme\\ThemeKeyNegotiator' not found in /data/www/shgc8/core/lib/Drupal/Component/DependencyInjection/Container.php on line 268
    – davem
    Jul 22 '16 at 15:35

Use Drush drush pm-uninstall themekey or Drupal Console drupal module:uninstall themekey to disable themekey from the command line.

  • Drupal console outputs the same error: [ERROR] Link template 'edit-form' for entity type 'themekey_rule' must start with a leading slash, the current link template is 'themekey_rule.edit'
    – davem
    Jul 22 '16 at 16:57
  • @davem Hmmm try drupal module:uninstall themekey --force
    – No Sssweat
    Jul 23 '16 at 0:08
  • @davem WOW looks like you got yourself in quite the pickle, that DEV version of D8 Themekey is from 2014, a ton of stuff in D8 changed since then, there was 0% chance of it working.
    – No Sssweat
    Jul 23 '16 at 7:47
  • @davem Backup your DB first, then search for themekey in your db and remove all those tables.
    – No Sssweat
    Jul 23 '16 at 7:56
  • I tried that - I couldn't find any reference to themekey. I've bitten the bullet and started afresh. 90% of what I've done so far is new modules, anyway - they're intact. Thanks all for the suggestions,.
    – davem
    Jul 23 '16 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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