Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
bforchhammer CreditAttribution: bforchhammer commentedComment #2
bforchhammer CreditAttribution: bforchhammer commentedHmm.. 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).
Comment #3
ptmkenny CreditAttribution: ptmkenny commentedOk, 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.
Comment #4
renat CreditAttribution: renat commentedI 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.
Comment #5
maxilein CreditAttribution: maxilein commentedI remember this one to go away after caches were cleared.
Comment #6
bforchhammer CreditAttribution: bforchhammer commentedRight, 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?
Comment #7
maxilein CreditAttribution: maxilein commentedFor 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.
Comment #8
miksha CreditAttribution: miksha commentedI 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.
Comment #9
Kevin Morse CreditAttribution: Kevin Morse commentedExactly 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.
Comment #10
Jose Reyero CreditAttribution: Jose Reyero commentedAdded to the release notes for variable 2.x too.
Comment #11
bforchhammer CreditAttribution: bforchhammer commentedThis seems to affect quite a lot of people, so maybe also add a note the project page?
Comment #12
Jose Reyero CreditAttribution: Jose Reyero commentedThere 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.