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.
I upgraded from 1.x-dev to 2.x-dev. After running update.php on 3-4 i18n-related db updates I got a WSOD with this error:
Fatal error: Call to a member function getDefaultWeight() on a non-object in /var/www/mysite/sites/all/modules/variable/variable_realm/variable_realm.module on line 548
...the updates were run successfully though and the site works just fine. So, this is just a heads-up.
Comments
Comment #1
marktheshark CreditAttribution: marktheshark commentedJust encountered the exact same error
.
Comment #2
phreadom CreditAttribution: phreadom commentedSame error here after updating from 1.2 to 2.0.
Comment #3
guillaumev CreditAttribution: guillaumev commentedSame error here...
Comment #4
Ramirez CreditAttribution: Ramirez commentedSame here: Same error here after updating from 1.2 to 2.0.
Comment #5
zisser CreditAttribution: zisser commentedSame here
Comment #6
pandersb CreditAttribution: pandersb commentedsame here
Comment #7
phreadom CreditAttribution: phreadom commentedIf it helps, I found that clearing the caches (I used the devel module's "empty cache" option) cleared up the errors, as I could also not access the Multilingual Variables settings after this and got white screens. (and I had to manually put the site back on-line since the update didn't finish cleanly.)
Comment #8
maxilein CreditAttribution: maxilein commentedClearing caches seems to have worked. Hope there is nothing left behind ...
Comment #9
vanderland CreditAttribution: vanderland commentedSame with my sites
Comment #10
jordiserra CreditAttribution: jordiserra commentedStill not working after clearing caches...
Comment #11
maxilein CreditAttribution: maxilein commentedI realize now that I missed the update to variable v 2 (before updating i18n) because it was not suggested in the list of available updates.
Why was variable 2 it not listed as an update to v 1?
Comment #12
jordiserra CreditAttribution: jordiserra commentedConfirmed, you have to upgrade variable to 2.x (and run update.php) before updating i18n module.
Thanks!
Comment #13
renat CreditAttribution: renat commented@jordiserra, you have to upgrade Variable and i18n simultaneously, otherwise there can be even more serious problems.
Comment #14
ganagus CreditAttribution: ganagus commentedExact same problem here. Variable module didn't notify the new 2.x version before I upgraded i18n. Then I downloaded the variable 2.x, copying and overwriting all previous version. Before I run update.php, I got the Fata error message above, and I couldn't open some module administration screens (for example Google Analytics). But after running update.php, everything is working fine now..
Comment #15
KhaledBlah CreditAttribution: KhaledBlah commentedI encountered the same error (during a run of update.php) and after clearing the caches update.php would run fine.
Comment #16
hexabinaer@renat (#13): updating simultaneously exactly run me into that error. Took me several approaches with different module order to overcome that hurdle.
I'd recommend first upgrade to Variable 2.x and run database update twice.
Comment #17
Jose Reyero CreditAttribution: Jose Reyero commentedYes, it may be wrong i18n version or that it needs a cache refresh. However, these errors shouldn't happen even when classes are not available, this one should be fixed now in latest dev.
Comment #19
mesr01 CreditAttribution: mesr01 commentedJust in case it helps someone, I had to proceed to a complete registry rebuild in order to recover from the wrecked upgrade.
Comment #20
rkm7448 CreditAttribution: rkm7448 commentedChange $i18n_string_object->cache_reset();
to
if ($i18n_string_object = i18n_string_get_by_lid($lid)) {
$i18n_string_object->cache_reset();
}
on line no 402, all\modules\i18n\i18n_string\i18n_string.pages.inc