Page MenuHomePhabricator

All search results on afwikibooks redirect to invalid URL (due to code in MediaWiki:Common.js)
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

I am getting redirected to https://af.wikibooks.org/wiki/https://af.wikibooks.org/w/index.php/Terte?search=Terte&title=Spesiaal:Soek&go=Wys.

What should have happened instead?:

I am getting redirected to https://af.wikibooks.org/wiki/Terte.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

MW 1.38.0-wmf.17

Event Timeline

The issue appears to be in the MediaWiki:Common.js page, the issue doesn't happen in with safemode=1, specifically line 276 in Common.js seems to be the offending line causing the malformed redirects

The MediaWiki:Common.js snippet causing this seems obsolete to me (it seems to come from dewiktionary which does not use it anymore, we haven't used Squid for user traffic in years and afaik don't collect search analytics from ats/varnish logs). Since there are no local int-admins or sysops I'm tempted to simply remove that code. Thoughts?

Aklapper renamed this task from Search function seems to be broken on afwikibooks to All search results on afwikibooks redirect to invalid URL (due to code in MediaWiki:Common.js).Jan 15 2022, 6:46 PM

Looking at https://af.wikibooks.org/w/index.php?title=MediaWiki:Common.js&action=history (folks likely not active on afwikibooks who made required edits in the past due to technical changes), I'd appreciate removing that code, yes.

In T299282#7624034, @Majavah wrote:

The MediaWiki:Common.js snippet causing this seems obsolete to me (it seems to come from dewiktionary which does not use it anymore, we haven't used Squid for user traffic in years and afaik don't collect search analytics from ats/varnish logs). Since there are no local int-admins or sysops I'm tempted to simply remove that code. Thoughts?

+1 that seems totally dead code.