Page MenuHomeMiraheze

PollNY does not work
Open, NormalPublic

Description

PollNY generates an error when attempting to create a poll.

Reported by Faunus on IRC stating that they received the error :
[dd0e3c529fbb02ddab4cce30] 2019-07-28 00:14:55: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

I've confirmed on test1wiki.

Event Timeline

Void triaged this task as Normal priority.Sun, Jul 28, 01:26
Void created this task.

I'm also getting similar errors using the Poll extension. Would this be because of having one enabled, and then the other?

Void moved this task from Backlog to Bugs on the Extensions board.Sun, Jul 28, 01:32
In T4579#86962, @Void wrote:

I'm also getting similar errors using the Poll extension. Would this be because of having one enabled, and then the other?

I don't think both can be enabled at once so maybe

Adding Operations since they can get more information from the logs

Paladox added a subscriber: Paladox.Mon, Jul 29, 13:11
2019-07-29 13:09:03 test1 test1wiki: [179c0835c6dd08d234c20f51] /wiki/Special:CreatePoll   Wikimedia\Rdbms\DBQueryError from line 1587 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `poll_choice` (pc_poll_id,pc_text,pc_order) VALUES ('2','test1','1')
Function: Poll::addPollChoice
Error: 1364 Field 'pc_vote_count' doesn't have a default value (mediawiki-internal-db-master.miraheze.org)

Is the error in the log i see.

RhinosF1 added a comment.EditedMon, Jul 29, 13:13
 2019-07-29 13:09:03 test1 test1wiki: [179c0835c6dd08d234c20f51] /wiki/Special:CreatePoll   Wikimedia\Rdbms\DBQueryError from line 1587 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
’’’

Did it get updated properly? Update.php running properly? Update.php not running would also make sense with the cargo issues.

’’’
Query: INSERT INTO poll_choice (pc_poll_id,pc_text,pc_order) VALUES ('2','test1','1')
Function: Poll::addPollChoice
Error: 1364 Field 'pc_vote_count' doesn't have a default value (mediawiki-internal-db-master.miraheze.org)

Is the error in the log i see.
Paladox added a comment.Mon, Jul 29, 13:20

Update.php is not ran, instead we give MW a list of sql files to use when it enables the extension (so that it creates the table).

So that is not the issue. What is the issue is that pc_vote_count is not set in https://github.com/wikimedia/mediawiki-extensions-PollNY/blob/2fe4960c30d9b0b3bf2b67b162cacf569bfd31df/includes/Poll.class.php#L44

Also pc_vote_count has no default value here https://github.com/wikimedia/mediawiki-extensions-PollNY/blob/52013cb70fd90fdb39cf304be2b3f13d4ac15bca/sql/poll_choice.sql#L6 hence why it throws when it hasn't got a value.

Update.php is not ran, instead we give MW a list of sql files to use when it enables the extension (so that it creates the table).

Okay

So that is not the issue. What is the issue is that pc_vote_count is not set in https://github.com/wikimedia/mediawiki-extensions-PollNY/blob/2fe4960c30d9b0b3bf2b67b162cacf569bfd31df/includes/Poll.class.php#L44

Do we know what it should be?

Also pc_vote_count has no default value here https://github.com/wikimedia/mediawiki-extensions-PollNY/blob/52013cb70fd90fdb39cf304be2b3f13d4ac15bca/sql/poll_choice.sql#L6 hence why it throws when it hasn't got a value.

Again, what should it be?

If there in Wikipedia repos then should this be Upstream

Paladox added a comment.Mon, Jul 29, 13:26

I'm not sure what it should be (the value).

I'm not sure what it should be (the value).

Based on them being in the WMF repos then this should probably be Upstream

I added it to Wikimedia Phabricator.

I added it to Wikimedia Phabricator.

Link??

RhinosF1 changed the task status from Open to Stalled.Tue, Jul 30, 07:39
RhinosF1 edited projects, added Upstream; removed Operations.

Improved the bug report as we actually need them to fix it - nothing we can do now

Paladox added a comment.Thu, Aug 8, 12:39

This is now fixed. Just need to apply the sql file to all wikis that have PollNy enabled.

Paladox changed the task status from Stalled to Open.Thu, Aug 8, 12:39