Last modified: 2014-11-12 15:15:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43065, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41065 - MessageContent varies by userlang but its content gets in parser cache without that option set
MessageContent varies by userlang but its content gets in parser cache withou...
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
1.21.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-16 07:37 UTC by Rainer Rillke @commons.wikimedia
Modified: 2014-11-12 15:15 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot showing the issue. Uploader of the photo this is a derivative of is https://commons.wikimedia.org/wiki/User:Red_Castle - License: unknown (280.91 KB, image/png)
2013-12-13 13:54 UTC, Rainer Rillke @commons.wikimedia
Details

Description Rainer Rillke @commons.wikimedia 2012-10-16 07:37:30 UTC
Current behaviour and how to replicate:
# Open a file description page where revision #0 is missing
(The revision #0 of the page named "Luftaufnahmen Nordseekueste 2012 05 D50 by-RaBoe 066.jpg" does not exist.

This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.)
# Switch your user language to e.g. "de" (either with uselang=de or in the prefs)
# Open the file description page again - you get the message again in English.
# Purge the server cache of that file (action=purge).
# Now, the message is rendered in German (de).
# Switch your user language back to English. The message will be still shown in German despite reloading the page.

Expected behaviour:
# Error message in user language. No cache pollution.

Test case:
https://commons.wikimedia.org/w/index.php?title=File:Luftaufnahmen_Nordseekueste_2012_05_D50_by-RaBoe_066.jpg&uselang=de
Comment 1 Bawolff (Brian Wolff) 2013-01-04 17:56:07 UTC
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.
Comment 2 Rainer Rillke @commons.wikimedia 2013-12-13 13:54:44 UTC
Created attachment 14082 [details]
Screenshot showing the issue. Uploader of the photo this is a derivative of is https://commons.wikimedia.org/wiki/User:Red_Castle - License: unknown
Comment 3 Stefan2 2013-12-13 18:33:21 UTC
[[Commons:File:Délégation générale du Québec à Londres 2013.JPG]] says "(missing-revision: 0)" for me too, but [[Commons:File:Ghost creepy 2013-12-12 17-52.jpg]] has text in Spanish (with uselang=sv):

"La revisión n.º 0 de la página llamada «Ghost creepy 2013-12-12 17-52.jpg» no existe.

Normalmente esto ocurre cuando se sigue un enlace de historial obsoleto que apunta a una página ya borrada. Puedes encontrar detalles en el registro de borrados."
Comment 4 Gerrit Notification Bot 2013-12-14 07:54:23 UTC
Change 101479 had a related patch set uploaded by Brian Wolff:
Mark ParserOutput of MessageContent as varying by userlanguage

https://gerrit.wikimedia.org/r/101479
Comment 5 Gerrit Notification Bot 2014-09-15 01:28:48 UTC
Change 101479 merged by jenkins-bot:
Mark ParserOutput of MessageContent as varying by userlanguage

https://gerrit.wikimedia.org/r/101479
Comment 6 Andre Klapper 2014-11-12 15:15:07 UTC
All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links