https://bugzilla.wikimedia.org/show_bug.cgi?id=41065

Bawolff (Brian Wolff) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|File management             |ContentHandler
           Assignee|[email protected]. |[email protected]
                   |org                         |ia.org
            Summary|Cache pollution for error   |MessageContent varies by
                   |messages (keeps previous    |userlang but its content
                   |language)                   |gets in parser cache
                   |                            |without that option set

--- Comment #1 from Bawolff (Brian Wolff) <[email protected]> ---
Ok, so what happens.

As a fallback, if the revision cannot be found, a MessageContent object is
returned with the message missing-revision. This then gets stored in parser
cache. The messageContent varries by user language, but its cached as if it
does not.

The quick fix would be in Article::fetchContentObject to instead of doing:
$this->mContentObject = new MessageContent( 'missing-revision', array( $oldid
), array() ) 
Do:
$this->mContentObject = new MessageContent( wfMessage( 'missing-revision'
)->inContentLanguage(), array( $oldid ), array() ) 

[as an aside, what is that third, empty array, parameter for?]

However, a more proper fix would be for MessageContent to signal that its
content varies by userlanguage to the ParserCache. That's getting a little bit
further into the ContentHandler stuff then I'm currently familiar with.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to