This morning I attempted to upgrade from Variable 1.2 to Variable 2.0.

I downloaded 2.0 using Drush, but this immediately resulted in the following error:

Fatal error: Call to undefined method VariableRealmDefaultController::setWeight() in /Volumes/Bullfrog/om/sites/all/modules/contrib/variable/variable_realm/variable_realm.module on line 396

I'm running Drupal 7.14.

I didn't try the dev version because as of now it is about 20 days behind the 2.0 release.

Comments

bforchhammer’s picture

Status: Active » Closed (duplicate)
bforchhammer’s picture

Hmm.. old version of the class stuck in cache somewhere? I remember having the same problem at some point; if I remember correctly, "rebuilding the file registry" helped for me (see http://drupal.org/project/registry_rebuild).

ptmkenny’s picture

Status: Closed (duplicate) » Closed (works as designed)

Ok, I found the source of the problem.

I had updated variable to 2.0 but kept i18n at 1.5 (when I update, I always update modules one at a time). However, apparently variable 2.0 conflicts with 1.5. Upgrading to variable 2.0 and i18n 1.6 at the same time eliminated the error.

renat’s picture

Status: Closed (works as designed) » Needs work

I think it would be nice to have a word about simultaneous upgrade necessity at release notes for Internationalization 7.x-1.6 and Variable 7.x-2.0. Otherwise many people can face the same problem.

maxilein’s picture

I remember this one to go away after caches were cleared.

bforchhammer’s picture

Right, so the registry rebuild thing you only need if you can't clear your caches anymore for some reason...

I agree that it might be a good idea to add a note that variable 2.x only works with > i18n-1.6. Jose?

maxilein’s picture

For the fast reader: variable 2.x only works with > i18n-1.6..

I had to clean the caches manually on the db! Disable i18n_variable module manually on the db.

miksha’s picture

I also used automatic update and ended with unusable site. I loged in my FTP, deleted i18n v1.6, uploaded i18n v1.5, and finished broken update of variable v2.0. Then, deleted both i18n v1.5 and variable v.2.0 and uploaded latest version of both and started update.php again. Updating them simultaneously is only method that seems to work for me.

Kevin Morse’s picture

Exactly the same thing for me as well. This is quite nasty... There really needs to be some sort of notice that not installing i18n first will white screen your website.

Jose Reyero’s picture

Category: bug » support
Status: Needs work » Active

Added to the release notes for variable 2.x too.

bforchhammer’s picture

This seems to affect quite a lot of people, so maybe also add a note the project page?

Jose Reyero’s picture

Category: support » bug
Priority: Normal » Critical
Status: Active » Fixed

There was something else too, the setWeight() method was missing and that is why it is crashing so badly because otherwise, it may not work but also not crash this way (I hope).

Marking this as critical because it seems it's causing a lot of site crashes when using automated updates.

It should be fixed now in latest dev.

Status: Fixed » Closed (fixed)

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