Page MenuHomeMiraheze

PollNY does not work
Closed, ResolvedPublic

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.Jul 28 2019, 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?

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

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.

 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.

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

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.Jul 30 2019, 07:39
RhinosF1 edited projects, added Upstream; removed Site Reliability Engineering.

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

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.Aug 8 2019, 12:39
Reception123 claimed this task.

Seems fixed. Please reopen if you are still experiencing issues with the extension.