Last modified: 2011-08-18 22:00:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31801, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29801 - Search suggestions aren't working on Portuguese Wikisource
Search suggestions aren't working on Portuguese Wikisource
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://pt.wikisource.org/wiki/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-10 19:34 UTC by Helder
Modified: 2011-08-18 22:00 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
No event listeners for #searchInput on ptwikisource (134.50 KB, image/png)
2011-07-10 19:34 UTC, Helder
Details
Event listeners for #searchInput on enwiki (195.92 KB, image/png)
2011-07-10 19:35 UTC, Helder
Details

Description Helder 2011-07-10 19:34:57 UTC
Created attachment 8765 [details]
No event listeners for #searchInput on ptwikisource

Go to [[wikisource:pt:Main page]] and to also [[Main page]] and compare the result of following these steps:
* Go to the main page
* Click on the search box
* Type "a"
On:
* [[Main page]]: some suggestions are displayed
* [[wikisource:pt:Main page]]: nothing happens
I've tested this both signed in/out, in both secure and unsecure servers, and both on Chromium 12.0.742.112 (90304) Ubuntu 11.04 and Firefox 5.0.

When the event listeners of the #searchInput element are inspected on Chromium:
* [[Main page]]: has some events
* [[wikisource:pt:Main page]]: has no events

I didn't find the cause on the local [[MediaWiki:Common.js]], but it is likely to be there, since other wikisources doesn't have the same problem.

See also:
* Bug 29516 - Searchbox displays text in gray instead of black
Comment 1 Helder 2011-07-10 19:35:49 UTC
Created attachment 8766 [details]
Event listeners for #searchInput on enwiki
Comment 2 Brion Vibber 2011-07-11 19:52:39 UTC
I'd guess this has something to do with it:

fNode.parentNode.innerHTML = getID( id ).parentNode.innerHTML; // f***ing IE

in http://de.wiktionary.org/wiki/MediaWiki:If-search.js

This bit of code looks like it will cause the entire contents of the form to be removed and replaced with freshly-parsed HTML; the new nodes would no longer have any previously-connected event handlers if they had been set up directly on the dom nodes.

It's not used on de.wiktionary.org, which may indicate that it's obsolete and broken?

Adding Krinkle to CCs (last touched that if-search.js in February)
Comment 3 Krinkle 2011-07-12 10:58:05 UTC
See also https://bugzilla.wikimedia.org/show_bug.cgi?id=29595
Comment 4 Krinkle 2011-07-12 10:58:26 UTC
It may or may not be used on de.wikt but it's often ref'ed from there (kinda the central point)
Comment 5 Mark A. Hershberger 2011-07-12 18:11:23 UTC
(In reply to comment #4)
> It may or may not be used on de.wikt but it's often ref'ed from there (kinda
> the central point)

So can you fix them all by working on dewiki?
Comment 6 Helder 2011-08-17 20:16:05 UTC
(In reply to comment #2)
> I'd guess this has something to do with it:
> 
> fNode.parentNode.innerHTML = getID( id ).parentNode.innerHTML; // f***ing IE
> 
> in http://de.wiktionary.org/wiki/MediaWiki:If-search.js

I can confirm that after removing[1] this script from Portuguese Wikisource, both this bug and bug 29516 disappeared.

[1]https://secure.wikimedia.org/wikisource/pt/w/index.php?diff=231041&oldid=229953
Comment 7 Mark A. Hershberger 2011-08-18 21:37:58 UTC
closing re comment #6
Comment 8 Helder 2011-08-18 22:00:41 UTC
(In reply to comment #7)
> closing re comment #6

Ok, but could anyone take a look into the script to help us to fix it, since it seems to be used by other projects as well?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links