Last modified: 2010-11-19 01:41:06 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 T27960, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25960 - Canonical links for File pages of files from a shared repo.
Canonical links for File pages of files from a shared repo.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-16 22:52 UTC by Krinkle
Modified: 2010-11-19 01:41 UTC (History)
3 users (show)

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


Attachments

Description Krinkle 2010-11-16 22:52:08 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
Comment 1 Bawolff (Brian Wolff) 2010-11-16 23:32:35 UTC
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
Comment 2 Derk-Jan Hartman 2010-11-17 00:23:42 UTC
Done in r76867
Comment 3 Krinkle 2010-11-17 01:24:17 UTC
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.
Comment 4 Derk-Jan Hartman 2010-11-17 09:17:31 UTC
I think the check needed for that would be: this->getID() == 0 

I have no real preference either way, what do others think ?
Comment 5 Bawolff (Brian Wolff) 2010-11-17 19:11:01 UTC
<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.
Comment 6 Derk-Jan Hartman 2010-11-19 01:41:06 UTC
Done in r76999

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


Navigation
Links