Addshore created this task. Addshore added projects: Wikidata-Campsite, Wikidata, wikidata-tech-focus, User-Addshore. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION Relates to: - T245062: Double ?uselang= passed to a file results in "Cache key contains characters that are not allowed: `P180_1101514477_fr?uselang=fr_label`" <https://phabricator.wikimedia.org/T245062> - T244562: Internal error on beta Commons Special:RecentChanges: Cache key contains characters that are not allowed <https://phabricator.wikimedia.org/T244562> SimpleCacheWithBagOStuff should not be so easy to use with cache keys that dont work. TBA all of the things written in this comment In T245062#5884942 <https://phabricator.wikimedia.org/T245062#5884942>, @Tarrow wrote: > So we (@Jakob_WMDE and @Rosalie_WMDE and me) looked at this in some detail. We came to the following conclusions (chip in if I misrepresented anything) > The ideal solution is for us to fix \Wikibase\Lib\SimpleCacheWithBagOStuff to reduce the number of times it fails by including some attempt to use makeKey. We were not keen to touch this on a Friday to fix the UBN though because: > > - it's currently untested due to T237164 <https://phabricator.wikimedia.org/T237164> > - it will change all our Wikibase caches (and potentially mean things like using new keys) > > We evaluated the patches by Leszek and concluded that: > > - it only filtered out possible non-term languages from the fallback chain > - this meant that bad languages could still be passed on to the EntityAccessor > > We considered moving this test for a valid term language to the getLanguage method but the problem was still that: > > - this would mean that valid interface languages (but not valid terms languages) would be filtered out (e.g. users with interface language 'fil' would not fallback to 'tag' but straight to 'en'. I.e. we don't want to mix up user interface and term languages at this level. > > We concluded that code merged that resulted in these errors starting now is probably due to the usage of `\Wikibase\Lib\Store\TermCacheKeyBuilder::buildCacheKey`. The two "new" places that use this are `\Wikibase\Lib\Store\CachingPrefetchingTermLookup::getCacheKey` and `\Wikibase\Lib\Store\UncachedTermsPrefetcher::getCacheKey` whereas `\Wikibase\Lib\Store\CachingFallbackLabelDescriptionLookup::getTerm` has used this for some time. > We are happy to see that these two are only concerned with terms so this seems an appropriate place to add that filtering. > To quickly follow is: > > - back-portable patch to get the train going ASAP > - separate patch for testing CachingPrefetchingTermLookup and UncachedTermsPrefetcher > > We will also make tickets/reevaluate priority for: > > - SimpleCacheWithBagOStuff being tested > - Making SimpleCacheWithBagOStuff less likely to throw > - investigating in greater detail how those bad languages got into wikibase scribunto (we struggled to see how in our rough and ready testing) TASK DETAIL https://phabricator.wikimedia.org/T245396 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore Cc: Addshore, Jakob_WMDE, Tarrow, Aklapper, Rosalie_WMDE, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
