-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
What is going wrong?
Describe the bug
Database error when voting on a text poll
To Reproduce
Steps to reproduce the behavior:
- Create a text poll
- Add two options
- Try to vote
Expected behavior
Vote should be saved,
Instead an exception is thrown by the database
Information about your polls installation
Polls version? git/master
Fresh installation or update from a prior version (from which one)? new
How did you install this version?(Appstore or describe installation) git
Information about your Instance of Nextcloud/ownCloud
Nextcloud or ownCloud?
Which Version? 14.0.3
Server configuration
Database: MySQL 5.7.24
PHP version: php 7.1.24
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
Remote Address: 127.0.0.1
Request ID: TAXTQr16P1mc3jjMsIj3
Type: Doctrine\DBAL\Exception\DriverException
Code: 0
Message: An exception occurred while executing 'INSERT INTO `oc_polls_votes`(`poll_id`,`user_id`,`vote_option_text`,`vote_answer`) VALUES(?,?,?,?)' with params [1, "test1", "test", "maybe"]: SQLSTATE[HY000]: General error: 1364 Field 'vote_option_id' doesn't have a default value
File: /home/nickv/Nextcloud/14/server/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
Line: 115
Trace
#0 /home/nickv/Nextcloud/14/server/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /home/nickv/Nextcloud/14/server/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(177): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'INSERT INTO `oc...', Array)
#2 /home/nickv/Nextcloud/14/server/lib/public/AppFramework/Db/Mapper.php(256): Doctrine\DBAL\Statement->execute()
#3 /home/nickv/Nextcloud/14/server/lib/public/AppFramework/Db/Mapper.php(130): OCP\AppFramework\Db\Mapper->execute('INSERT INTO `*P...', Array)
#4 /home/nickv/Nextcloud/14/server/appstank/polls/lib/Controller/PageController.php(351): OCP\AppFramework\Db\Mapper->insert(Object(OCA\Polls\Db\Votes))
#5 /home/nickv/Nextcloud/14/server/lib/private/AppFramework/Http/Dispatcher.php(166): OCA\Polls\Controller\PageController->insertVote(1, 'test1', Array, Array, false, true)
#6 /home/nickv/Nextcloud/14/server/lib/private/AppFramework/Http/Dispatcher.php(99): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Polls\Controller\PageController), 'insertVote')
#7 /home/nickv/Nextcloud/14/server/lib/private/AppFramework/App.php(118): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Polls\Controller\PageController), 'insertVote')
#8 /home/nickv/Nextcloud/14/server/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OCA\\Polls\\Contr...', 'insertVote', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#9 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#10 /home/nickv/Nextcloud/14/server/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#11 /home/nickv/Nextcloud/14/server/lib/base.php(987): OC\Route\Router->match('/apps/polls/ins...')
#12 /home/nickv/Nextcloud/14/server/index.php(42): OC::handleRequest()
#13 {main}
Reactions are currently unavailable