Page MenuHomePhabricator

Recent search regression: changing certain components in the search bar changes the URL to a plain index.php
Closed, DuplicatePublic

Description

This is a problem because a plain index.php causes the next search performed to revert to the default search namespace, and all subsequent searches will default unless alternate namespaces are selected in the checkboxes. Normally, the selected namespace would be remembered for consecutive searches, but this means the namespaces are only remembered for one search.

Here's four examples of the bug being triggered (some use the article namespace and some use all namespaces):

The fourth example is particularly weird, because when I first noticed and started documenting this bug yesterday, those searches worked fine. I don't think the codebase on the English Wikipedia has changed in the last day, so it's possible there are different contexts that affect when the bug triggers, though I can't imagine what those could be.

More specifically, the difference I've noticed between today and yesterday is the following sequence now sets the URL to a plain index.php, when it didn't previously:

  1. hastemplate:Notsure
  2. [switch namespace to all]
  3. hastemplate:Notsure intitle:"GA1" or hastemplate:Notsure intitle:GA1

But this sequence still doesn't:

  1. hastemplate:Notsure
  2. hastemplate:Notsure intitle:"GA1" or hastemplate:Notsure intitle:GA1

And here's another example that didn't previously trigger the bug, but now does:


I say this is a recent regression because I often refine my searches when I'm searching, and I didn't have this problem when I did some searches on May 6. So it was introduced to the English Wikipedia somewhere between May 6 and May 17 (yesterday as of this writing). It seems likely this regressed in this recent MediaWiki update, though it probably was caused by some update to CirrusSearch (disclaimer: I don't know the codebase very well, so I may be mistaken).

This bug makes it extremely difficult to revise searches, and it was introduced recently, so I hope this can be prioritized appropriately.

Event Timeline

@EBernhardson @dcausse @Krinkle I notice you three worked on the recent CirrusSearch changes; perhaps you can shed some light on where this is coming from (or if it's even coming from CirrusSearch, as opposed to core).

Most likely related to https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/508933/. The "plain" index.php is simply the form being submitted via POST instead of GET. It looks like this is interacting badly with AdvancedSearch which probably assumes things are always GET's.

@thiemowmde any ideas?

Change 511020 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@master] Revert "Make powersearch form use POST if JS is disabled"

https://gerrit.wikimedia.org/r/511020

Change 511025 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/AdvancedSearch@master] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/511025

Change 511020 abandoned by Thiemo Kreuz (WMDE):
Revert "Make powersearch form use POST if JS is disabled"

https://gerrit.wikimedia.org/r/511020

I believe this can be merged as a duplicate of T223709: Namespace selection in AdvancedSearch is not respected any more, and is also already fixed via https://gerrit.wikimedia.org/r/511025. Unfortunately, the patch is blocked on failing tests.

Change 511025 merged by Thiemo Kreuz (WMDE):
[mediawiki/extensions/AdvancedSearch@master] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/511025

Change 518007 had a related patch set uploaded (by WMDE-Fisch; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/AdvancedSearch@wmf/1.34.0-wmf.8] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/518007

Change 518007 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@wmf/1.34.0-wmf.8] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/518007

Change 518756 had a related patch set uploaded (by WMDE-Fisch; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/AdvancedSearch@wmf/1.34.0-wmf.8] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/518756

Change 518756 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@wmf/1.34.0-wmf.8] Enforce a GET request when the "remember" user setting doesn't change

https://gerrit.wikimedia.org/r/518756