Last modified: 2014-11-18 18:07:31 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 T11670, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9670 - template redirection breaks edit section links
template redirection breaks edit section links
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://hu.wikipedia.org/w/index.php?t...
: patch, patch-need-review
Depends on:
Blocks: 4899
  Show dependency treegraph
 
Reported: 2007-04-23 17:11 UTC by Tisza Gergő
Modified: 2014-11-18 18:07 UTC (History)
1 user (show)

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


Attachments

Description Tisza Gergő 2007-04-23 17:11:03 UTC
Edit section links in a redirected template don't follow redirection, but point
to (nonexistent) sections in the redirect page instead.

Steps to reproduce:
1. create template A containing at least one section title.
2. move template to B
3. transclude A into a page

Actual results:
The [edit] link next to the title of the transcluded section will point to a
section of template A; if you click on the link, you will get an error message
saying the section does not exist.

Expected results:
Either the link should point to the corresponding section of template B in the
first place, or you should be redirected to editing that section upon clicking
on the link.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-24 00:02:58 UTC
Something like this should work, added to Linker::editSectionLinkForOther:

if ( $redirect = new Article($title)->followRedirect() && $redirect instanceof
Title ) {
  $title = $redirect;
}

I haven't tested it.
Comment 2 Brion Vibber 2007-04-26 18:00:10 UTC
The correct fix is probably to get the redirect target at template interpolation
time, when the template title is being base64-substituted into the temporary
expanded code.

Then it'll be the correct value when extracted to make the links.
Comment 3 Steve Sanbeg 2007-05-01 17:27:45 UTC
fixed in r21758

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


Navigation
Links