Page MenuHomePhabricator

"fallback" key missing from localization cache
Closed, ResolvedPublic

Description

I have been getting this for weeks, and i'm still getting it with the latest trunk:

Notice: Undefined index: fallback in /var/www/daniel/TestWiki-TIFF/phase3/includes/LocalisationCache.php on line 211:

{main}(  ) called from ../index.php:0
WebRequest->getVal(  ) called from ../index.php:56
WebRequest->getGPCVal(  ) called from ../WebRequest.php:250
StubContLang->checkTitleEncoding(  ) called from ../WebRequest.php:228
StubContLang->__call(  ) called from ../StubObject.php:0
StubObject->_call(  ) called from ../StubObject.php:121
StubObject->_unstub(  ) called from ../StubObject.php:57
StubContLang->_newObject(  ) called from ../StubObject.php:103
Language::factory(  ) called from ../StubObject.php:126
Language::newFromCode(  ) called from ../Language.php:140
Language::getFallbackFor(  ) called from ../Language.php:169
LocalisationCache->getItem(  ) called from ../Language.php:2803

So, the item "fallback" is missing from the localization cache. While poking at this, i found that:

  • rebuilding the localization cache doesn't help
  • it doesn't matter if i'm logged in, or what interface language I use
  • I have the content language set to "de", didn't try another.
  • If I touch localsettings, the warning is gone for *one* request, then re-appears

The last point leads me to the conclusion that something gets mangled during caching. When localsettings changes, the cache is discarded, and the (whatever) data is created afresh, and works fine. In the next request, it's pulled from the cache, but is found to be incomplete for some reason.

It's strange that this should only happen to me, though... any ideas?


Version: 1.17.x
Severity: major

Details

Reference
bz24995

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:10 PM
bzimport set Reference to bz24995.
bzimport added a subscriber: Unknown Object (MLST).

Would be interesting to know if the $code passed to Language::getFallbackFor() is always the same.

Right, I must have missed this piece from the documentation:

  • @param $oldId Integer revision ID, null to fetch from request, zero for current

Seems a bit unsafe to have that as the default value.

Well, I also get that Notice... (content language = 'es')

*** Bug 25096 has been marked as a duplicate of this bug. ***

Fixed in r74932.

It was missing in the cache because it was called when it was already loading it.