Last modified: 2014-11-18 18:07:31 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.
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.
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.
fixed in r21758