Page MenuHomePhabricator

Choice not stored in database in MW 1.24
Closed, ResolvedPublic

Description

I can click bottom but the choice would not store into database.

Unnamed_QQ_Screenshot20150112140441.jpg (369×446 px, 30 KB)

Mine problem or Everyone can't use it? Any alternative extension available?

Event Timeline

Zoglun raised the priority of this task from to Needs Triage.
Zoglun updated the task description. (Show Details)
Zoglun added a project: AJAXPoll.
Zoglun subscribed.

Hi @Zoglun,
is this on a public instance? Any link?
Also see http://www.mediawiki.org/wiki/Manual:How_to_debug

Aklapper renamed this task from Looks like not working properly in MW 1.24. to Choice not stored in database in MW 1.24.Jan 12 2015, 8:48 PM
Aklapper set Security to None.

Yes, tried this link: http://en.moegirl.org/Sandbox

I saw nothing after enable following settings.
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;

Is this acknowledged as a bug? I am experiencing the same problem running MW 1.24.

This comment was removed by TakahashiNZ.

@TakahashiNZ: Not sure how "acknowledgement" would look like. :) This is a public bug report and whoever feels like writing a patch could and should do that.

I managed to get it working somewhat by substituting .on() for .live() in resources\ajaxpoll.js

Changing your vote still doesn't seem to work properly and there are a number of errors about deprecated calls but it is working now.

Will see if I can fix all the errors and then I'll try and figure out how to publish a patch.

OK, I managed to get everything working with no errors and I think its better than ever before :)

There was a call to sajax_do_call() that was generating a bunch of deprecation errors. I replaced it with the method outlined here:
Legacy JavaScript

Also I noticed that once you had clicked on any element the JavaScript would stop working until the page was reloaded, this occurred because the Ajax call returns HTML which replaces the original form and the JavaScript handlers are not reinstated.

To fix this I wrapped all the JavaScript in a function so that it can be executed after the new HTML is inserted.

Sorry but setting up Gerrit to do a proper patch was taking to long.

Here is my patched copy of ajaxpoll.js, perhaps someone with Gerrit set up will submit it.

My apologies if I haven't fixed things in the most elegant manner, I'm only a novice.

OK I have submitted a patch via gerrit, if someone reviews it then it should get merged into the master branch

OK I have submitted a patch via gerrit

Please follow http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines so there will be an automatic link to the patch pasted in this task. Thanks :)

What do we need to do to get the master branch updated?

The current 1.88 version is useless with the current version of MW.

https://gerrit.wikimedia.org/r/#/c/190751/ has been merged and it says "Branch: master".
To me this task looks fixed; please change status to "resolved" via the "Action" dropdown if you agree.

TakahashiNZ claimed this task.

Yes I would agree that the the bug is resolved, what concerns me is that if you got to the AJAXPoll homepage at Extension:AJAXPoll Then it is still linking to version 1.88 which dates to 2014-03-30, what do we need to do to get that updated?

if you got to the AJAXPoll homepage at Extension:AJAXPoll

[...]

what do we need to do to get that updated?

An edit to that wiki page.