Last modified: 2014-11-18 18:07:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9670 - template redirection breaks edit section links
template redirection breaks edit section links
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: 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: ---


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.