Last modified: 2014-09-24 00:06:37 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 T25204, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23204 - Links to file redirect pages do not have the mw-redirect class
Links to file redirect pages do not have the mw-redirect class
Status: NEW
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks: 166
  Show dependency treegraph
 
Reported: 2010-04-15 15:16 UTC by Derk-Jan Hartman
Modified: 2014-09-24 00:06 UTC (History)
6 users (show)

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


Attachments
patch to mark redirected files as such (680 bytes, patch)
2010-04-18 00:41 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2010-04-15 15:16:15 UTC
I notice that when including links to filepages (NOT including an image), these links do not have the mw-redirect class as other links to redirects do.

Example. On the english wikipedia try create a link to,
[[:File:AFProsperity.jpg]], which redirects to [[:File:AFProsperity.png]].
Comment 1 Derk-Jan Hartman 2010-04-18 00:08:32 UTC
This is because for such file links, the deprecated makeKnownLinkObj is used, which automatically adds "noclasses" for link().

As a matter a fact, there are a lot of link helpers that add "noclasses"
Comment 2 Derk-Jan Hartman 2010-04-18 00:41:09 UTC
Created attachment 7304 [details]
patch to mark redirected files as such

Links to files like this are checked with isAlwaysKnown by the parser. The redirect resolves, so the file is known. I'm not sure what the best method is to solve this.

1: Remove NS_FILE from the Title isAlwaysKnown() check
2: Change the makeKnownLinkHolder of the parser to use link() directly instead of makeKnownLinkObj, but without adding the "noclasses" option. See attached patch.
Comment 3 Krinkle 2011-03-18 22:03:53 UTC
Is this still the case in 1.18alpha (install a /trunk on your local machine or ask sites like TranslateWiki) ?
Comment 4 Sumana Harihareswara 2011-11-04 19:17:07 UTC
Derk-Jan, could you check with the 1.18 beta that came out today?
Comment 5 Sumana Harihareswara 2012-03-23 22:05:28 UTC
Derk-Jan: sorry for the wait in review. I encourage you to get a Git account

https://www.mediawiki.org/wiki/Git

to make it easier for you to submit changes to MediaWiki and to get them reviewed faster.  Thanks!
Comment 6 Max Semenik 2012-03-29 21:27:38 UTC
(In reply to comment #5)
> Derk-Jan: sorry for the wait in review. I encourage you to get a Git account
> 
> https://www.mediawiki.org/wiki/Git
> 
> to make it easier for you to submit changes to MediaWiki and to get them
> reviewed faster.  Thanks!

thedj had a svn account so he apparently can commit to git, too. Sometimes, people submit their patches to bug tracker if they are unsure about their viability, to get them pre-reviewed.

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


Navigation
Links