File/image redirects on shared repo (commons) are not followed on non-English local sites
Closed, ResolvedPublic

Description

File redirects on Commons work locally and from English sites, but don't seem to be working from other languages...

Works locally:
http://commons.wikimedia.org/wiki/File:Blason_dpt_fr_HautesAlpes.svg

Works remotely on English:
http://en.wikipedia.org/wiki/File:Blason_dpt_fr_HautesAlpes.svg
http://en.wikinews.org/wiki/File:Blason_dpt_fr_HautesAlpes.svg

Fails, showing empty page:
http://fr.wikipedia.org/wiki/Fichier:Blason_dpt_fr_HautesAlpes.svg
http://fr.wikinews.org/wiki/Fichier:Blason_dpt_fr_HautesAlpes.svg
http://de.wikipedia.org/wiki/Datei:Blason_dpt_fr_HautesAlpes.svg
http://de.wikinews.org/wiki/Datei:Blason_dpt_fr_HautesAlpes.svg

Offhand I'm guessing something's using the local namespace name in a cache or DB lookup, which naturally enough fails when it's difference from what Commons is storing (the English master name).


Version: unspecified
Severity: major
URL: http://fr.wikipedia.org/wiki/Fichier:Blason_dpt_fr_HautesAlpes.svg

bzimport set Reference to bz21026.
brion created this task.Via LegacyOct 6 2009, 7:26 PM
brion added a comment.Via ConduitOct 6 2009, 7:39 PM

Think I've found it; setting up a local test to confirm fix before I commit.

brion added a comment.Via ConduitOct 6 2009, 8:13 PM

Ok confirmed steps to reproduce:

  • Set up shared repo wiki w/ English
  • Set up client wiki w/ French (or other language with non-default 'File:' namespace) using it via ForeignDBRepo, with 'hasSharedCache' on
  • Configure both to use memcached
  • Upload some file to shared repo, say 'Redirect test target.png'
  • Access a so far non-existent file 'Redirect test source.png' *from the client site*
  • Create a redirect *on the shared repo* from 'File:Redirect test source.png' to 'File:Redirect test target.png'
  • Attempt to access 'Redirect test source.png' again from both wikis

Expected result:

  • Functional redirect on English master site
  • Functional redirect on French client site

Actual result:

  • Functional redirect on English master site
  • Missing redirect on French client site, as though the site never exists

The two wikis are caching their redirect lookups under separate keys because the key includes the local namespace name. When the English wiki updates its records for the creation of the redirect, it thus isn't able to clear the negative-lookup record the French wiki cached previously. Until the cache record expires, it won't attempt to look up the redirect in the database again.

brion added a comment.Via ConduitOct 6 2009, 8:24 PM

Fixed in r57434.

brion added a comment.Via ConduitOct 6 2009, 8:29 PM

Fix deployed live.

Gilles added a project: Multimedia.Via WebDec 4 2014, 10:47 AM
Gilles moved this task to Closed on the Multimedia workboard.Via WebDec 4 2014, 10:49 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.