Page MenuHomePhabricator

Allow URL forwarding for search, while keeping native MW search for editors?
Open, MediumPublic

Description

@HappyDog (since you originally wrote the documentation I think) and others who may be knowledgeable about this.

Originally posted at https://www.mediawiki.org/w/index.php?title=Topic:Ucvujwwl2m3509du&topic_showPostId=ucvujwwmmshtgi2q#flow-post-ucvujwwmmshtgi2q

For website visitors I'd like to forward searches to a different URL using Manual:$wgSearchForwardUrl but need to keep the standard MW search page for internal use. Unfortunately, setting $wgSearchForwardUrl to a different URL (which requires that $wgDisableTextSearch is set to true) also adds a redirect from Special:Search to the alternative URL. Is there any way the two approaches can live together?

Clarification: one could, for instance, use $wgSearchForwardUrl to send visitors straight to a search engine like Google or DuckDuckGo (pick your favourite here), or even a wiki page that embeds a search engine.

For internal use, however, in order that editors can find the right template or anything purposely hidden from web crawlers, you'd still need something like "the standard MW search page". That functionality seems gone once $wgSearchForwardUrl points to an alternative URL. Its impact is total: the "Search" option of the searchbox (as opposed to "Go" to send you straight to the wiki page), the Special:Search page and everything with ?search= appended share the same new target.

My best chance is probably to create a new extension, but I'm hoping there's an easier route. One possible avenue I have in mind is to forget about $wgSearchForwardUrl and to rebuild the searchbox so that the full-text search option ("Search" not "Go") takes you to a different URL. In other words, limit URL forwarding to a specific option in the searchbox, but I don't know if that's possible.

Event Timeline

Cavila created this task.May 12 2018, 8:17 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 12 2018, 8:17 AM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptMay 12 2018, 8:42 AM
EBjune triaged this task as Medium priority.May 31 2018, 5:32 PM
EBjune added a subscriber: EBjune.

Unfortunately, this looks more like a UI issue than anything Search Platform can address on the back end

Removing myself - I created the original manual page for this setting, but all the information was drawn from other sources. I have no direct knowledge about this setting, so can't help with this.

HappyDog removed a subscriber: HappyDog.Jun 1 2018, 5:36 AM
Vvjjkkii renamed this task from Allow URL forwarding for search, while keeping native MW search for editors? to m2caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from m2caaaaaaa to Allow URL forwarding for search, while keeping native MW search for editors?.Jul 2 2018, 3:12 PM
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: HappyDog.
CommunityTechBot edited subscribers, added: Aklapper; removed: HappyDog.