Last modified: 2010-11-19 01:41:06 UTC
A few times I caught myself trying an easy way to discover the local wiki a file was (is!) on when it was moved to Commons, by Googling for the filename. However instead of a result on Commons and one for the local wiki I get dozens of pages filled with all results from each and every wiki that same file-page. Can a <link caconical> be added on File-pages if the file is from a shared repositary and a local page does not exist (ie. some en.wiki file pages have Featured Picture-templates on the local page but the file is from Commons - in this case the caconical link should not go to Commons. -- Krinkle
My first reaction to this was I bet <link rel="canonical"... has to be in the same domain, but apparently I am wrong - http://googlewebmastercentral.blogspot.com/2009/12/handling-legitimate-cross-domain.html
Done in r76867
Does this also happen when the File-page has a local file page aswell ? There are many files on Commons that have a mini-page on en.wikipedia with just a {{FeaturedPicture}} template on it. MediaWiki handles these local filepages without media as a header for the shared image description and is displayed between the .sharedUploadNotice and #shared-image-desc. Example: http://en.wikipedia.org/wiki/File:NURBS_3-D_surface.gif This file is on Commons, and description too but it has a local description aswell I suggest adding another condition to the if statement added in r76867 to see if a local page exists, in that case don't create the canonical link.
I think the check needed for that would be: this->getID() == 0 I have no real preference either way, what do others think ?
<link rel="Canonical"> only works (from my understanding) if the pages are the same, or very close. If a wiki created a local description page, the description might not be close enough for the link tag to work. But assuming the <link rel="Canonical"> actually works in that case, then we would be stopping content on the local wiki from being indexed, which seems wrong.
Done in r76999