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

marktheshark’s picture

Just encountered the exact same error

.

phreadom’s picture

Same error here after updating from 1.2 to 2.0.

guillaumev’s picture

Same error here...

Ramirez’s picture

Version: 7.x-2.x-dev » 7.x-2.0

Same here: Same error here after updating from 1.2 to 2.0.

zisser’s picture

Same here

pandersb’s picture

same here

phreadom’s picture

If 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.)

maxilein’s picture

Clearing caches seems to have worked. Hope there is nothing left behind ...

vanderland’s picture

Same with my sites

jordiserra’s picture

Still not working after clearing caches...

maxilein’s picture

I 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?

jordiserra’s picture

Confirmed, you have to upgrade variable to 2.x (and run update.php) before updating i18n module.

Thanks!

renat’s picture

@jordiserra, you have to upgrade Variable and i18n simultaneously, otherwise there can be even more serious problems.

ganagus’s picture

Exact 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..

KhaledBlah’s picture

I encountered the same error (during a run of update.php) and after clearing the caches update.php would run fine.

hexabinaer’s picture

@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.

Jose Reyero’s picture

Status: Active » Fixed

Yes, 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.

Status: Fixed » Closed (fixed)

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

mesr01’s picture

Just in case it helps someone, I had to proceed to a complete registry rebuild in order to recover from the wrecked upgrade.

rkm7448’s picture

Issue summary: View changes

Change $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