Steps to reproduce:
1. Enable both ECK and ECK Entity cache
2. Disable both ECK and ECK Entity cache
3. Attempt to uninstall ECK Entity cache

Fatal error: Fatal error: Class 'EntityType' not found in sites/all/modules/contrib/eck/modules/eck_entitycache/eck_entitycache.install on line 16

Comments

fmizzell’s picture

No luck figuring out a hack for this. I tried adding the file with the class, but a lot of other important stuff does not run, since eck is disabled, specifically the entity_info and schema hooks.
So, I tried enabling eck in the uninstall hook of eck_entitycache, but I could not figure out an appropriate hook to disable the module again, and leaving the system in a different state than what the user originally had it does not seem right to me.
So, for now, I don't see a good solution to this problem.

aimeerae’s picture

+1 - this happens to me, same reproduction steps.

EDIT: you CAN uninstall! when I first read the issue I thought it was there forever!

1. re-enable your eck module
2. uninstall eck_entitycache

(if you are going uninstall eck, too)
3. disable eck
4. uninstall eck

Yay! All is well. A little clunky, but at least it can be uninstalled. I worried for a moment.

donutdan4114’s picture

Issue summary: View changes

This is still happening.
If it can't truly be fixed, perhaps we can just show a message when the user goes to uninstall ECK Entity Cache.
If ECK is disabled, show a message:

You will not be able to uninstall ECK Entity Cache when ECK is disabled. You must re-enable the ECK module, uninstall ECK Entity Cache, and then disable ECK module again. Please see https://drupal.org/node/1955866 for more information.

  • fmizzell committed 00d37c6 on 7.x-2.x
    Issue #1955866: Cannot uninstall eck_entitycache if eck is disabled
    

  • fmizzell committed 11c276d on 7.x-3.x
    Issue #1955866: Cannot uninstall eck_entitycache if eck is disabled...
fmizzell’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Active » Fixed

Is not a "solution" but this issue is now prevented in the code, by not allowing Drupal to disable eck if eck_entitycache is installed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.