https://bugzilla.wikimedia.org/show_bug.cgi?id=51736
Krinkle <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Summary|Redirects to |Redirects to |sections/anchors should not |sections/anchors should not |depend on javascript |depend on | |redirectToFragment | |javascript --- Comment #1 from Krinkle <[email protected]> --- If redirects where resolved at the URL level, this would be trivial (we'd include the fragment in the 301 or 302 Location header). However since MediaWiki doesn't do that, there is no way that I know of to automatically skip to a section without javascript. Example: Page [[Knight 4000]] is a redirect to section "Knight 4000" on page [[KITT#Knight_4000]] When linking to it from within a page like "[[Knight 4000]]" it renders as <a href="./Knight_4000">. One could wonder why this isn't resolved server-side, but I imagine it has to do with caching (the redirect target can change, and the article linking to it would have to be purged). When accessing it directly by url (/wiki/Knight_4000) the server doesn't redirect with 301 or 302, instead it responds normally with the content of the redirect target ([[KITT]] in this case) and the redirectToFragment javascript jumps to the correct section). Note that redirect pages do contain a <link rel=canonical> to avoid these from being indexed as duplicate entries. So possible solutions: * When accessed directly, do a proper 301 or 302 redirect instead of target content with <link rel=canonical> * Or; if the above is infeasible or undesired: Have the MediaWiki parser resolve links inside a page to the redirect target (naturally including the fragment), so that [[Knight 4000]] would result in <a href="./KITT#Knight_4000"></a> instead of <a href="./Knight_4000"></a>. However this is likely even less feasible as that would require us to purge all pages that link to a redirect when the redirect is edited -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
