Uninstalling chatroll using modules uninstall crashed database completely.

Comments

topy’s picture

I confirm this fact!!! mf fact... (((

bryancasler’s picture

Glad I saw this before giving it a try, Subscribe!

nick123pig’s picture

Confirmed. It's happening to me too. It changes the theme back to default, and does some funky things with content permissions.

m1n0’s picture

I have experienced the same problem. I believe I know the solution. In chatroll.install in hook_uninstall there is a code

foreach (array_keys($conf) as $key) {
    // Find variables that have the 'chatroll_' module prefix
    if (strpos($key, 'chatroll_') == 0) {
      variable_del($key);
    }
  }

Its supposed to find every key in table variable that has string 'chatroll_' on position 0 (start of the string) and delete it. Problem is that

if (strpos($key, 'chatroll_') == 0) 

returns TRUE for every record of variable table because 0 also equals false...so what you need to do is to use '===' instead of '==' like this

if (strpos($key, 'chatroll_') === 0) 

This worked for me perfectly.

Please consider updating this into module.

andrii_svirin’s picture

fuck site had fallen
Ban this module and Author

germanmikel’s picture

adding the = sign worked great. Thanks so much. Please add for the next module update!

interestingaftermath’s picture

subscribe

michelle’s picture

patrickd’s picture

Status: Active » Fixed

I temporarily took this over.
Should be fixed in 1.1 release.

Thanks everyone

Status: Fixed » Closed (fixed)

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

miccelito’s picture

Status: Closed (fixed) » Active

Didn't see this issue until now. Sorry for re-opening it but I have an urgent problem..

Having chatroll 6.x-1.0 version installed at one of my sites. One of the admins did the uninstall (tho.. didn't expect that chatroll module would have such a bug) and the whole website has crashed. No pages can be accessed now.

So my question is.. How can I solve to get the website working again? Did the "chatroll uninstall" messed up the database? Possible to fix this by phpmyadmin and change something in the tables?

I guess there is no database backup since the last auto backup was tooken during the website been in crashed status.

patrickd’s picture

It deleted all entries from the variables table, meaning that any settings that were made are now re-setted to their default values. No there's no simple fix for this - the data is just lost. The only way to fix this is by re-importing a backup of the variables-table.
The other way is to re-configure any settings that were made.

Protip: Always keep more than one backup so the last one won't get overwritten with the broken database when you actually need it.

Sorry :(

miccelito’s picture

Would be evil if the chatroll module has caused that a website with thousands of users and content are gone, just because of a bad bug from chatroll 6.x-1.0 version maintainer...

Edit: Fortunately last auto backup was made just minutes before the database broke, so it's reset and working now.

patrickd’s picture

Status: Active » Fixed

very good! :)

Status: Fixed » Closed (fixed)

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