Page MenuHomePhabricator

"context.config.$region.offset() is null" in jquery.suggestions.js while typing in search box
Closed, ResolvedPublic

Description

Happening on trunk; when typing in the search box, suggestions box pops up but doesn't fill with suggestions.

"context.config.$region.offset() is null" err on line 138 of jquery.suggestions.js


Version: unspecified
Severity: normal

Details

Reference
bz32685

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:02 AM
bzimport set Reference to bz32685.
bzimport added a subscriber: Unknown Object (MLST).

Turns out this is actually:

  • $wgEnableMWSuggest is *not* enabled
  • Extension:Vector is being used
  • $wgVectorUseSimpleSearch is *not* enabled

so it looks like some of the search code is trying to run when it's not enabled.

I think this is happening because the 'vector-simplesearch' option was left enabled; Vector.hooks.php seems to indicate that to activate the simplesearch module it's checking for the user settings but *is not* checking whether it's actually enabled... and apparently then the code never checks that its structures are actually present.

Fixed in r104465: simplesearch now checks if it's actually present on the page before hooking up suggestions to the search box.