Page MenuHomePhabricator

Advanced search checkboxes are broken
Closed, DuplicatePublic

Description

  1. Open browser console
  2. Visit mw.org Special:Search > Advanced
  3. Click [All], [None], toggle individual checkboxes

Result:
All & None buttons have no effect, and enabling individual namespace checkboxes has no effect on which namespaces are searched.

Meanwhile in browser console:

Exception thrown by mediawiki.special.search
TypeError: this.form is null

with ?debug=1

TypeError: this.form is null
https://bits.wikimedia.org/static-1.25wmf12/resources/src/mediawiki.special/mediawiki.special.search.js
Line 53
this.form.method = this.checked ? 'post' : 'get';

In theJS, $checkboxes is an empty array. The jQuery selector

$checkboxes = $( '#powersearch input[id^=mw-search-ns]' );

doesn't work because the <form id="powersearch" ...> closes before the checkboxes and other advanced features.

FWIW in debug mode I get warnings like 'Use of "addCheckboxClickHandlers" is deprecated. Use jquery.checkboxShiftClick instead.'

It also happens on beta labs.

Is there a browser test for advanced search? Do we log Exception thrown in JavaScript code?

Event Timeline

Spage raised the priority of this task from to High.
Spage updated the task description. (Show Details)
Spage changed Security from none to None.
Spage updated the task description. (Show Details)
Spage subscribed.

Seems like this is another duplicate of (or is at least related to) T78553 ?