Last modified: 2013-06-18 15:47:13 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 T31595, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29595 - Search suggestions broken on als.wikipedia.org
Search suggestions broken on als.wikipedia.org
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Krinkle
:
: 32366 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-26 17:23 UTC by Clemens Kienzle
Modified: 2013-06-18 15:47 UTC (History)
5 users (show)

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


Attachments

Description Clemens Kienzle 2011-06-26 17:23:12 UTC
The drop-down search function on the Alemannic Wikipedia (als.wikipedia.org) only works while being on the recent changes page (http://als.wikipedia.org/wiki/Spezial:Letschti_%C3%84nderige). On any other page, the search engine will not display possible matches (even though it does take you to the page if you press search).
Comment 1 Brion Vibber 2011-06-27 20:26:10 UTC
I can confirm this, but noticed several really weird things trying to track it down.

Top of my suspects list: someone has created a global '$' function which is incompatibility with jQuery:

http://als.wikipedia.org/wiki/MediaWiki:Common.js

This definitely causes trouble when loading with ?debug=true -- I can see a $('body').is('.rtl') call failing in some of the Vector extension setup bits, which probably stops the SimpleSearch setup somewhere along the line.

I don't see the exact same failure when loading without debug=true, but may be other related things interfering.
Comment 2 Roan Kattouw 2011-06-28 12:32:49 UTC
(In reply to comment #1)
> I don't see the exact same failure when loading without debug=true, but may be
> other related things interfering.
That's because in non-debug mode, we do automagic (function($) { code })(jQuery); wrapping, but in debug mode we load files raw. This is why files MUST ALWAYS be wrapped that way if they use $ as an alias for jQuery.
Comment 3 Clemens Kienzle 2011-07-04 06:58:00 UTC
Unfortunately there is currently no one active at als.wikipedia who knows much about this. Could someone tell us what exactly the suggestion at http://als.wikipedia.org/wiki/MediaWiki_Diskussion:Common.js means? That way I could implement it, or else someone could be given temporary adminship.
Comment 4 Roan Kattouw 2011-07-04 08:56:05 UTC
Per comment #1, while alswiki can work around this by changing their local scripts, this is a bug that should be fixed in the software. I'll poke this later today.
Comment 5 Krinkle 2011-07-04 23:12:21 UTC
I ran a tour [1] on als.wikipedia.org just now.

Should be fixed.
Comment 7 Clemens Kienzle 2011-07-05 05:25:55 UTC
The search function still isn't working though for me and at least one other user. 

There's also the problem that a few high-profile templates that apparently relied on this script have stopped working. Most importantly: http://als.wikipedia.org/wiki/Vorlage:Titel, this is very serious because our articles are saved under the Standard German title, but have the Alemannic title displayed through a template. This means that virtually every page is affected (see http://als.wikipedia.org/wiki/Honigbuck). This is a bit off-topic, but is anyone able to fix that template?
Comment 8 Holder 2011-07-05 10:55:35 UTC
It seems that the magic word DISPLAYTITLE doesn't work on alswikipedia.org.
Comment 9 Roan Kattouw 2011-07-05 19:12:47 UTC
(In reply to comment #4)
> Per comment #1, while alswiki can work around this by changing their local
> scripts, this is a bug that should be fixed in the software. I'll poke this
> later today.

I did this (aliased $ properly so redefining $ doesn't break search) just now.
Comment 10 Krinkle 2011-07-05 19:16:23 UTC
(In reply to comment #8)
> It seems that the magic word DISPLAYTITLE doesn't work on alswikipedia.org.

DISPLAYTITLE works fine. Note that Wikipedia has a restriction on DISPLAYTITLE: It must match the actual title when decoding it. So one can't display "Hùùnibùg" on "Honigbuck" or vice versa.

But using DISPLAYTITLE:eBay on article "EBay" (notice the lower-case e) will work fine.

Anyway, if there are issues with it still, please open a seperate bug.
Comment 11 Clemens Kienzle 2011-07-05 19:49:31 UTC
The DISPLAYTITLE thing is a separate issue, I just brought it up in case someone had a quick fix to it. But the actual reason I reopened this is because the search function still isn't working.
Comment 12 Holder 2011-07-06 04:03:09 UTC
Krinkle, I'm really sorry, but I had to reset all your changes. Search function still wasn't working properly and our template "Vorlage:Titel" is very important because it affects nearly all articles. Perhaps a solution could be found without "damaging" that template? Kind regards.
Comment 13 Krinkle 2011-07-11 00:01:54 UTC
What exactly is broken ? The search itself works fine:  http://i.imgur.com/XHuhQ.png

The search suggestions work fine too: http://i.imgur.com/NBaGH.png

I've renamed the title as I suspect your report is about the suggestions underneath during the typing, not about the search itself. ("drop down menu").

How exactly is that template related to the search ?
Comment 14 Krinkle 2011-07-11 00:04:13 UTC
Why did you undo all modifications I made to the site scripts ? What exactly broke where ? Samples and screenshots will help if you want me to fix it.
Comment 15 Clemens Kienzle 2011-07-11 07:23:04 UTC
Strange that the search suggestions work for you, they don't work for me (or any other users I've talked to). It will take me to the article if I enter the whole title, but it won't display any suggestions as I type.

Holder undid the modifications because several templates stopped working. Most importantly: http://als.wikipedia.org/wiki/Vorlage:Titel

On als.wikipedia, all articles are saved under the Standard German keyword, but the Alemannic title is displayed through the above template. For example, on http://als.wikipedia.org/wiki/Kartoffel the title is displayed as "Härdöpfel".

Something in the changes you made caused this template to stop working. So instead of "Härdöpfel" it would display "undefined". Since this affects nearly all pages, it is pretty serious.

Maybe we should first figure out why "Vorlage:Titel" doesn't work with your modifications, and then figure out the search function? Should I open a new bug for that?
Comment 16 Holder 2011-07-12 12:23:41 UTC
I undid all your modifications because I didn't know which of them was responsible for the breaking of the template.

I don't think that the template is related to the search function. 

Search suggestions don't work for me too. Perhaps this depends on the used browser? I'm using Firefox 5.0.
Comment 17 Holder 2011-07-12 12:39:29 UTC
Krinkle, I've taken over your global.js skript on meta, now search suggestions are working fine for me :-).
Comment 18 Holder 2011-07-12 12:58:29 UTC
On the other side the title template isn't working now. It seems that there is indeed a relation between this template and the search suggestions ...
Comment 19 Brion Vibber 2011-11-14 20:55:24 UTC
As of 2011-11-14, search suggestions do not work for me on als.wikipedia.org.

As of 2011-11-14, the magic title replacement when using {{Titel}} does work for me on als.wikipedia.org.

Bug 32366 appears to just be a continuation of this bug, so I'll merge it in.
Comment 20 Brion Vibber 2011-11-14 20:56:04 UTC
*** Bug 32366 has been marked as a duplicate of this bug. ***
Comment 21 Brion Vibber 2011-11-14 21:10:08 UTC
So here's your problem.

The code that does the properTitle replacement is in another script:

https://als.wikipedia.org/w/index.php?title=MediaWiki:If-pTitle.js

which never got updated.

If that was getting run with regular jQuery back in the $ slot, it would fail here:

   var pTitle = $("pTitle").innerHTML;

returning "undefined". which would then get used in the title replacement.
Comment 23 Brion Vibber 2011-11-14 22:03:57 UTC
Ok I've resolved some of the main breakages -- and the title script is updated to work -- but the search suggestions still aren't working for me, so I'll have to poke a little more. Will return shortly.
Comment 24 Brion Vibber 2011-11-14 22:36:55 UTC
The actual search suggestions appear to have been broken by this script:
https://de.wiktionary.org/wiki/MediaWiki:If-search.js

which appears to blindly destroy any DOM attachments such as, say, event handlers in the search form. I've removed it as it's unclear what it's even for.
Comment 25 Brion Vibber 2011-11-14 22:54:29 UTC
Ok I think I've got these all worked out now. I've also removed the If-search.js script that was being pulled in from the master copy on de.wiktionary.org; that script itself is broken (it's what stopped search suggestions from working) and appears to be of limited/no use at present.

I've checked in with Krinkle about that script; it may get tweaked in future to work cleaner or be dropped entirely, depending.

Currently I see working search suggestions, the title replacements work, and the SSL mixed-mode warnings I was seeing on https://als.wikipedia.org/ appear to now be resolved. Please give a shout if anything else is broken!
Comment 26 Clemens Kienzle 2011-11-15 08:52:32 UTC
Everything appears to be working fine now (at least after clearing my browser). Awesome! Thank you so much for your work!

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


Navigation
Links