Page MenuHomePhabricator

Remove sajax usage from MediaWiki core
Closed, ResolvedPublic

Description

sajax is ancient and should be cleared out of core bit by bit.

http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/64380


Version: unspecified
Severity: enhancement

Details

Reference
bz40785

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz40785.

Related URL: https://gerrit.wikimedia.org/r/65641 (Gerrit Change I4a0af8986f924cd127a73828e72da6998f28536c)

What is the exact proper replacement? Why is this so urgent?
Many social extensions, including, but not limited to, SocialProfile make heavy use of sajax_* functions and I'm not a big fan of removing it just because there's the ah-so-great jQuery. Sajax isn't hurting anyone, so I'm all for keeping it.

What is the exact proper replacement?

mediawiki.api and jQuery.

Why is this so urgent?

Who said it was urgent? This bug was left for 7 months...

just because there's the ah-so-great jQuery

You should be using mediawiki.api for most of this stuff...

Sajax isn't hurting anyone, so I'm all for keeping it.

That's not really a valid reason to keep something.

Related URL: https://gerrit.wikimedia.org/r/66265 (Gerrit Change I52f01e4e7d8a0ee595b4775068c8a3d630140092)

Change 65641 merged by jenkins-bot:
Replace remaining sajax use

https://gerrit.wikimedia.org/r/65641

(In reply to comment #5)

Change 65641 merged by jenkins-bot:
Replace remaining sajax use

https://gerrit.wikimedia.org/r/65641

Is this bug now resolved/fixed?

Sort of.

Core is no longer using Sajax and anyone else trying to use it will get JS console warnings if debug=true.

However, the sajax library is still in core. It can't be removed until extensions have stopped using it - particularly SecurePoll, which is in use on Wikimedia wikis, but maybe we should also allow time for BlogPage, CommunityVoice, DonationInterface (this seems sort of used on Wikimedia sites, not 100% sure about that), Drafts, OnlineStatus, and ReaderFeedback (there may be others that I've missed) to stop using it.

Anyway we've done all we can here in core for now so marking RESOLVED, bugs should be filed against extensions, gadgets, user scripts, etc. to remove use of sajax. When it's (basically) all gone from use we can reopen this to remove sajax completely.

How about we just leave it open like a normal bug and mark usage in extensions as blockers.

I've never heard of treating a bug as "FIXED for now, but we'll re-open it later when we're able to actually fix it".

Change 80042 had a related patch set uploaded by Brian Wolff:
Follow-up db51c53b8f. Fix already used variable name.

https://gerrit.wikimedia.org/r/80042

Change 80043 had a related patch set uploaded by Brian Wolff:
Follow-up db51c53b8f. Fix already used variable name.

https://gerrit.wikimedia.org/r/80043

remarking as fixed.

Change 80042 merged by jenkins-bot:
Follow-up db51c53b8f. Fix already used variable name.

https://gerrit.wikimedia.org/r/80042

(In reply to comment #8)

How about we just leave it open like a normal bug and mark usage in
extensions as blockers.

I'm going to change this bug to focus exclusively on sajax _usage_ in MediaWiki core.

I've filed two separate bugs:

  • bug 53120: remove sajax itself from MediaWiki core

which is blocked by (or depends on):

  • bug 53119: sajax usage in MediaWiki extensions (tracking)
    • bug 53122: Kill sajax usage in SecurePoll extension

This bug is now properly resolved/fixed.

Change 80043 abandoned by Brian Wolff:
Follow-up db51c53b8f. Fix already used variable name.

https://gerrit.wikimedia.org/r/80043