Last modified: 2013-04-22 16:14:30 UTC
From the watchlist, there is a link "Feedback from my watched pages »" to go to [[Special:ArticleFeedbackv5Watchlist]]. This link has an hardcore appended ?ref=watchlist. In a wiki with default URL configuration leading to a {$wgScript}?title=$1 article path, the target link is wrong. [ Current behavior ] The link leads to /w/index.php?title=Special:ArticleFeedbackv5Watchlist?ref=watchlist As the [[Special:ArticleFeedbackv5Watchlist?ref=watchlist]] doesn't exist, it will lead to 404: "You have requested an invalid special page. A list of valid special pages can be found at Special pages." [ Expected behavior ] Expected link: /w/index.php?title=Special:ArticleFeedbackv5Watchlist&ref=watchlist
[ Adding javascript keyword, the link being built in JS ] Relevant code: // Build the url to the Special:ArticleFeedbackv5 page var params = { ref: 'watchlist' }; var url = mw.config.get( 'wgArticleFeedbackv5SpecialWatchlistUrl' ) + '?' + $.param( params );
Currently on en.wp, wgArticleFeedbackv5SpecialWatchlistUrl is "/wiki/Special:ArticleFeedbackv5Watchlist". This is a very bad decision. It should be "Special:ArticleFeedbackv5Watchlist" instead, so one can construct the URL with: mw.config.get('wgScript') + '?title=' + mw.config.get('wgArticleFeedbackv5SpecialWatchlistUrl') + '&' + $.param( params ); And for the plain URL to the special page, without params: wgArticlePath.replace('$1', mw.config.get('wgArticleFeedbackv5SpecialWatchlistUrl'));
You're right Jesús, I agree with your recommendation. Meanwhile, I prepared Gerrit change #40324 for a quick fix, but I would prefer your solution to be implemented, I'm cloning the bug appropriately.
Well... I made a search, wgArticleFeedbackv5SpecialWatchlistUrl is only used to build this link and nothing else, so I guess it's safe I directly prepare an alternative patch instead implementing your solution.
Quick fix merged. For reference, I opened Gerrit change #40327 for the more elegant solution offered by Jesús.