I just uninstalled OG because the lastest revision was giving me errors and now I get this: Fatal error: Call to undefined function og_membership_type_access() in /home/gamernom/public_html/sites/all/modules/entity/entity.module on line 427

Using the latest entity api 7.x-1.x-dev (Although it happens with the latest release too.)
I had Organic Groups 1.2 when I uninstalled OG.

Comments

fago’s picture

Title: uninstallation troubles due to outdated entity info » uninstallation troubels due to outdated entity info

This is probably caused by a menu_rebuild working with stale entity info - see #996236: drupal_flush_all_caches() does not clear entity info cache

fago’s picture

Title: Fatal error: Call to undefined function og_membership_type_access() in /home/gamernom/public_html/sites/all/modules/entity/enti » uninstallation troubles due to outdated entity info
Priority: Critical » Major
fago’s picture

Title: uninstallation troubels due to outdated entity info » uninstallation troubles due to outdated entity info

The Drupal 7 patch at #996236-45: drupal_flush_all_caches() does not clear entity info cache (#45) should fix the issue, but it needs to be applied before disabling modules. Afterwards, manually clearing the cache should help.

alan d.’s picture

Would this be related to #1274692: Error on Disabling Module. I got a fatal error when uninstalling the field collection module.

fago’s picture

Priority: Major » Critical

bumping priority

ouyang1512’s picture

I had the same problem when I tried to disable module Profile2. The error message is:

Fatal error: Class 'Profile2MetadataController' not found in /usr/local/apache2/htdocs/drupalfolder/sites/all/modules/entity/entity.info.inc on line 23

I was no longer be able to access the site.

Then I had to follow the suggestions in this thread "#1274692: Error on Disabling Module" commenting out line 23 and 24 in /sites/all/modules/entity/entity.info.inc to get the site back, and then turned the Profile 2 back on. Very frustrating.

Any final solution to this issue?

MrsWho’s picture

I too have been unable to get rid of the mains of profile2 (see my issue here: http://drupal.org/node/1294200). I also have been unable to get rid of linkit in the modules list after uninstall. Looking at phpmyadmin, the trace linkit fragments are in the system table.

fago’s picture

Anonymous’s picture

I ran into the same issue while disabling profile2. As it was an my local testing environment, I decided to simply truncate all cache tables (all tables beginning with "cache_" as well as the table "cache").

The site is now accessible again and seems to do fine. Would somebody please comment, if this procedure could cause any side effects or if it's feasible for production sites, too?

alan d.’s picture

Should be safe. I've done this 1000 times. The only danger is that the timeout is set too low, it may take 30s or more to repopulate these tables. If you hit a timeout, try hitting refresh a few times :)

marktheshark’s picture

Had the same issue, also had to truncate cache tables in phpmyadmin to get the site operational again, as per the suggestion in #9.

kenorb’s picture

+1

ressa’s picture

Thanks for the tip, truncating all tables beginning with "cache_" fixed it.

leex’s picture

Tuncating cache tables worked for me as well.

Step 1: Uninstall module, an error will appear.
Step 2: Truncate cache and cache_ tables
Step 3: Everything should be working normally now.

If you have any complications, just try installing the module again, then following the steps.

fago’s picture

Status: Active » Fixed

#1325126: uninstallation troubles due to outdated entity info got committed. Thus update to drupal 7.12 and your problems should be gone now :)

Status: Fixed » Closed (fixed)

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

roynilanjan’s picture

Issue summary: View changes

This is an issue related to entity module + cache API
referring to https://www.drupal.org/node/1370046