Page MenuHomePhabricator

WikiBhasha does not work with Wikipedia's secure server
Closed, InvalidPublic

Description

Author: reachouttothetruth

Description:
Every language of Wikipedia is also available through HTTPS. I have provided the URL for the English Wikipedia secure server. These are not supported by WikiBhasha, but probably should be.


Version: unspecified
Severity: enhancement
URL: http://secure.wikimedia.org/wikipedia/en/wiki/

Details

Reference
bz27139

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:24 PM
bzimport set Reference to bz27139.

Giving lower priority to this issue for now.

At least for the bookmarklet code the fix should be easy, because currently it is just checking location.href against the regex:
/^(http):\/\/[A-Za-z]+.(wikipedia.org)/

but it could check for
/^(http):\/\/[a-z0-9\-]+.(wikipedia.org)|https:\/\/secure\.wikimedia\.org\/wikipedia\//i

or something like that. See also the regex used on
http://en.wikipedia.org/wiki/MediaWiki:Common.js/secure.js

anil_ande wrote:

we realize that there are few issues with CTF popup (not displaying properly) on 'https' version.
we are looking into the issue.

Now that we have "Native HTTPS support enabled for all Wikimedia Foundation wikis"[1], could you try to fix this bug at least for the new https://*.wikipedia.org addresses?

I think the regex from [2]
/^(http):\/\/[A-Za-z]+\.(wikipedia.org)/

could be changed to
/^(https?):\/\/[A-Za-z\-]+\.(wikipedia.org)/

(notice that the inclusion of the "-" in the character class is necessary for wikis such as
http://roa-rup.wikipedia.org/
http://be-x-old.wikipedia.org/
http://zh-yue.wikipedia.org/
http://bat-smg.wikipedia.org/
)

Besides, the instructions for "Installing WikiBhasha beta as a Wikipedia Gadget"[3] should be updated to use protocol relative URLs and mw.loader.load (because importScriptURI is deprecated[4]), as in:

mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:WikiBhasha.MSR/WikiBhasha.js&action=raw&ctype=text/js&smaxage=21600&maxage=86400' );

[1] http://blog.wikimedia.org/2011/10/03/native-https-support-enabled-for-all-wikimedia-foundation-wikis/
[2] http://www.wikibhasha.org/js/main.js
[3] http://www.wikibhasha.org/wikibhasha/install.htm
[4] http://www.mediawiki.org/wiki/RL/JD#wikibits.js

(In reply to comment #5)

mw.loader.load(
'//en.wikipedia.org/w/index.php?title=User:WikiBhasha.MSR/WikiBhasha.js&action=raw&ctype=text/js&smaxage=21600&maxage=86400'
);

Uoops, this "ctype=text/js" is wrong (I think I reported this somewhere else). It should be "ctype=text/javascript".

Does this work on the new secure, ie https://xx.wikipedia.org ?

If so, this bug should be closed, we're not making it work on secure.wm.o

Not really.

The "Wikipedia Gadget" version present in the documentation[1] imports the code from a wiki page[2] which was not updated since 8 December 2010‎[3], so the regex is still the same and ignores "https" (be it from new or old secure server).

[1] http://www.wikibhasha.org/wikibhasha/install.htm
[2] https://en.wikipedia.org/wiki/User:WikiBhasha.MSR/WikiBhasha.js?oldid=401217727
[3] https://en.wikipedia.org/wiki/User:WikiBhasha.MSR/WikiBhasha.js?action=history

It's a shame that this is basically abandonware.. apparently.

http://en.wikipedia.org/w/index.php?title=User%3AWikiBhasha.MSR%2FWikiBhasha.js&diff=552250760&oldid=401217727
I have updated the launcher part on en.wikipedia, but I can't fix their website, or the main wikibasha script that the en.wp launcher is loading of course. :(

The code is still in our SVN and didn't make it to git:
http://www.mediawiki.org/wiki/Extension:WikiBhasha
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/WikiBhasha

Even if we did
But if it doesn't deploy on their website, then probably it'll be quite pointless.

Any way we could gather some user stats of this script ?

Any way we could gather some user stats of this script ?

@TheDJ, is there any use getting analytics involved in this?

is there any use getting analytics involved in this?

I doubt it. https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=WikiBhasha.js&fulltext=Search&ns2=1&profile=advanced finds about 400 results, it's possible to check how many of those users are still active. I doubt many active users chose the bookmarklet or greasemonkey install options.

Anyway, machine translation literature review could not find any significant usage of the tool (there is only one recent publication as Microsoft abandoned the project long ago).

TheDJ claimed this task.

Nothing to fix here by us. Too bad that Microsoft went silent on this one.
I'll update the user page to make sure that people are aware.