nextcloud / polls

🗳️ Polls app for Nextcloud
https://apps.nextcloud.com/apps/polls
GNU Affero General Public License v3.0
256 stars 73 forks source link

Unable to add date options in NC26 #2930

Closed ttenroK closed 1 year ago

ttenroK commented 1 year ago

⚠️ This issue respects the following points: ⚠️

What went wrong, what did you observe?

After the upgrade to NC26 it isn't possible to add new date options to a poll. After trying to add a date, an error appears at the right top, e.g. "Fehler beim Hinzufügen von 5. Juni 2023"/"Error when adding 5 June 2023".

What did you expect, how polls should behave instead?

Instead, the date option should be added to the poll.

What steps does it need to replay this bug?

  1. Upgrade to NC26
  2. Create a new poll
  3. Try to add a new date as option

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

Updated from previous major version (i.e. 3.x.x to 4.x.x)

Affected polls version

5.0.5

Which browser did you use, when experiencing the bug?

Other browser

No response

Which System did you use, when experiencing the bug?

Other OS

No response

Add your browser log here

JQMIGRATE: Migrate is installed, version 3.4.0 jquery-migrate.min.js:2:698
session heartbeat polling started session-heartbeat.js:103:9
Registering notifications container as a menu NotificationsApp.vue:219
Notifications permissions granted NotificationsApp.vue:453
Has notify_push enabled, slowing polling to 15 minutes NotificationsApp.vue:231
Polling interval updated to 900000 NotificationsApp.vue:413
Started background fetcher as session_keepalive is enabled NotificationsApp.vue:275
Got notification data NotificationsApp.vue:376
Polling interval updated to 900000 NotificationsApp.vue:413
XHRPOST
https://<mydomain>/apps/polls/option
[HTTP/2 500 Internal Server Error 551ms]

Error adding option: <!DOCTYPE html>
<html>
<head>
    <title>Internal Server Error - Storage Share - Hetzner Online GmbH</title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <link rel="apple-touch-icon" sizes="180x180" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA9lBMVEXVDC3bMEzqiJjzucP1xc33ztX1xs7zusTri5vcNFDWFDTjX3XtlaTvo6/xrrnvpLHtmaflaH3YGzrndIf++/z//////f3oe43eQlz75ur98vPjWnHcM0///P3//v7dO1XWFTT76Ov+9/jaKUbqhpbskaDjXHLpfpDxr7rzu8XriprxrLf2ytHtmKbzvMX0vcb2zNPum6n0v8j2zdT3z9b30Nf30df42N3bLEnwqLT76u3unqv2ydDunKnsj57qhZbskJ/kZnrpgJHbL0v++vvcN1LXGjn87/HmcYThUGf99PXqhJXwqbXwqrbZI0HmcIPwpbLZJEIhxI7dAAAAAWJLR0QV5dj5owAAAAlwSFlzAAAFMQAABTEBt+0oUgAAAAd0SU1FB…

Object { error: {…} }

Object { payload: {…} }
options.js:185:3

Additional client environment information

Nextcloud is hosted on Hetzner-servers

NC version

Nextcloud 26 (Nextcloud Hub 4)

Other Nextcloud version

No response

PHP engine version

Other/Don't know

Other PHP version

8.2

Database engine

MySQL

Database Engine version or other Database

10.5

Which user-backends are you using?

Add your nextcloud server log here

-

Additional environment informations

No response

Configuration report

No response

List of activated Apps

Enabled:
  - activity: 2.18.0
  - appointments: 1.15.1
  - audioplayer: 3.3.1
  - bruteforcesettings: 2.6.0
  - cadviewer: 8.70.4
  - calendar: 4.3.4
  - calendar_news: 1.1.7
  - calendar_resource_management: 0.5.0
  - circles: 26.0.0
  - cloud_federation_api: 1.9.0
  - collectives: 2.5.0
  - comments: 1.16.0
  - contacts: 5.2.0
  - contactsinteraction: 1.7.0
  - dashboard: 7.6.0
  - dav: 1.25.0
  - documentserver_community: 0.1.13
  - external: 5.1.0
  - extract: 1.3.5
  - federatedfilesharing: 1.16.0
  - federation: 1.16.0
  - files: 1.21.1
  - files_accesscontrol: 1.16.0
  - files_automatedtagging: 1.16.1
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - files_zip: 1.4.0
  - firstrunwizard: 2.15.0
  - forms: 3.3.0
  - fulltextsearch_elasticsearch: 26.0.0
  - groupfolders: 14.0.2
  - logreader: 2.11.0
  - lookup_server_connector: 1.14.0
  - memories: 5.1.0
  - nextcloud_announcements: 1.15.0
  - notifications: 2.14.0
  - notify_push: 0.6.3
  - oauth2: 1.14.0
  - onlyoffice: 7.8.0
  - password_policy: 1.16.0
  - photos: 2.2.0
  - polls: 5.0.5
  - previewgenerator: 5.3.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - recommendations: 1.5.0
  - registration: 2.1.0
  - related_resources: 1.1.0-alpha1
  - serverinfo_hetzner: 1.18.0
  - settings: 1.8.0
   - sharebymail: 1.16.0
  - spreed: 16.0.4
  - support: 1.9.0
  - survey_client: 1.14.0
  - suspicious_login: 4.4.0
  - systemtags: 1.16.0
  - tables: 0.5.0
  - talk_matterbridge: 1.26.0
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
   - twofactor_totp: 8.0.0
  - updatenotification: 1.16.0
  - user_status: 1.6.0
  - viewer: 1.10.0
  - weather_status: 1.6.0
  - workflowengine: 2.8.0
Disabled:
  - admin_audit: 1.16.0
  - encryption: 2.14.0
  - end_to_end_encryption: 1.12.5 (installed 1.12.5)
  - files_external: 1.18.0
   - mail: 3.1.1 (installed 3.1.1)
  - ownpad: 0.7.1 (installed 0.7.1)
  - pandoc: 0.5.0 (installed 0.5.0)
   - richdocuments: 8.0.2 (installed 8.0.2)
  - theming_customcss: 1.14.0 (installed 1.14.0)
   - user_ldap: 1.16.0
  - wopi: 3.5.11 (installed 3.5.11)

Nextcloud Signing status

No errors have been found.

Additional Information

No response

dartcafe commented 1 year ago

The server log is needed, since it is an 500 error.

BTW: The warnings can get excluded from the console log.

ttenroK commented 1 year ago

The server log is needed, since it is an 500 error.

BTW: The warnings can get excluded from the console log.

Hmm... I don't have any logs. If I navigate to https://<mydomain>/settings/admin/logging there are no server logs. Even when I activate all levels of logging.

dartcafe commented 1 year ago

That's bad. Without it, I can only guess what the error can be.

Just a try: call occ polls:db:rebuild to check or fix the db structure.

Martin-bl commented 1 year ago

Same problem for me in nextcloud 25.0.6 + Polls 5.0.5 and occ polls:db:rebuild works for me :smiley: But why this isn't automatic ? thanks

dartcafe commented 1 year ago

because there is a bug.

JayBeRayBearGun commented 1 year ago

i've got the same issue,... but occ polls:db:rebuild generates errors but polls app works afterwards

[index] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42703]: Undefined column: 7 ERROR: column "poll_option_hash" of relation "oc_polls_options" does not exist LINE 1: ...options" ("poll_id", "order", "poll_option_text", "poll_opti... ^ at <>

  1. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 328 OC\DB\Exceptions\DbalException::wrap(["Doctrine\DBAL ... "])
  2. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 138 OC\DB\QueryBuilder\QueryBuilder->executeStatement()
  3. /var/www/html/custom_apps/polls/lib/Db/OptionMapper.php line 51 OCP\AppFramework\Db\QBMapper->insert(["OCA\Polls\Db ... e])
  4. /var/www/html/custom_apps/polls/lib/Service/OptionService.php line 150 OCA\Polls\Db\OptionMapper->insert(["OCA\Polls\Db ... e])
  5. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Service\OptionService->add(2, 0, "Een", 0)
  6. /var/www/html/custom_apps/polls/lib/Controller/BaseController.php line 87 OCA\Polls\Controller\OptionController->OCA\Polls\Controller{closure}(" sensitive parameters replaced ")
  7. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Controller\BaseController->responseCreate(["Closure"])
  8. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Polls\Controller\OptionController->add(2, 0, "Een", 0)
  9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController(["OCA\Polls\Co ... "], "add")
  10. /var/www/html/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Polls\Co ... "], "add")
    1. /var/www/html/lib/private/Route/Router.php line 315 OC\AppFramework\App::main("OCA\Polls\Con ... r", "add", ["OC\AppFramewo ... "], ["polls.option.add"])
    2. /var/www/html/lib/base.php line 1058 OC\Route\Router->match("/apps/polls/option")
    3. /var/www/html/index.php line 36 OC::handleRequest()

Caused by:

Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing a query: SQLSTATE[42703]: Undefined column: 7 ERROR: column "poll_option_hash" of relation "oc_polls_options" does not exist LINE 1: ...options" ("poll_id", "order", "poll_option_text", "poll_opti... ^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1814 Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(["Doctrine\DBAL ... "], ["Doctrine\DBAL\Query"])
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1749 Doctrine\DBAL\Connection->handleDriverException(["Doctrine\DBAL ... "], ["Doctrine\DBAL\Query"])
  3. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1163 Doctrine\DBAL\Connection->convertExceptionDuringQuery(["Doctrine\DBAL ... "], "INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  4. /var/www/html/lib/private/DB/Connection.php line 295 Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  5. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354 OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280 Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326 OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 138 OC\DB\QueryBuilder\QueryBuilder->executeStatement()
  9. /var/www/html/custom_apps/polls/lib/Db/OptionMapper.php line 51 OCP\AppFramework\Db\QBMapper->insert(["OCA\Polls\Db ... e])
  10. /var/www/html/custom_apps/polls/lib/Service/OptionService.php line 150 OCA\Polls\Db\OptionMapper->insert(["OCA\Polls\Db ... e])
    1. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Service\OptionService->add(2, 0, "Een", 0)
    2. /var/www/html/custom_apps/polls/lib/Controller/BaseController.php line 87 OCA\Polls\Controller\OptionController->OCA\Polls\Controller{closure}(" sensitive parameters replaced ")
    3. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Controller\BaseController->responseCreate(["Closure"])
    4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Polls\Controller\OptionController->add(2, 0, "Een", 0)
    5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController(["OCA\Polls\Co ... "], "add")
    6. /var/www/html/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Polls\Co ... "], "add")
    7. /var/www/html/lib/private/Route/Router.php line 315 OC\AppFramework\App::main("OCA\Polls\Con ... r", "add", ["OC\AppFramewo ... "], ["polls.option.add"])
    8. /var/www/html/lib/base.php line 1058 OC\Route\Router->match("/apps/polls/option")
    9. /var/www/html/index.php line 36 OC::handleRequest()

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42703]: Undefined column: 7 ERROR: column "poll_option_hash" of relation "oc_polls_options" does not exist LINE 1: ...options" ("poll_id", "order", "poll_option_text", "poll_opti... ^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103 Doctrine\DBAL\Driver\PDO\Exception::new(["PDOException", ... ]])
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1153 Doctrine\DBAL\Driver\PDO\Statement->execute()
  3. /var/www/html/lib/private/DB/Connection.php line 295 Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354 OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280 Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326 OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 138 OC\DB\QueryBuilder\QueryBuilder->executeStatement()
  8. /var/www/html/custom_apps/polls/lib/Db/OptionMapper.php line 51 OCP\AppFramework\Db\QBMapper->insert(["OCA\Polls\Db ... e])
  9. /var/www/html/custom_apps/polls/lib/Service/OptionService.php line 150 OCA\Polls\Db\OptionMapper->insert(["OCA\Polls\Db ... e])
  10. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Service\OptionService->add(2, 0, "Een", 0)
    1. /var/www/html/custom_apps/polls/lib/Controller/BaseController.php line 87 OCA\Polls\Controller\OptionController->OCA\Polls\Controller{closure}(" sensitive parameters replaced ")
    2. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Controller\BaseController->responseCreate(["Closure"])
    3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Polls\Controller\OptionController->add(2, 0, "Een", 0)
    4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController(["OCA\Polls\Co ... "], "add")
    5. /var/www/html/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Polls\Co ... "], "add")
    6. /var/www/html/lib/private/Route/Router.php line 315 OC\AppFramework\App::main("OCA\Polls\Con ... r", "add", ["OC\AppFramewo ... "], ["polls.option.add"])
    7. /var/www/html/lib/base.php line 1058 OC\Route\Router->match("/apps/polls/option")
    8. /var/www/html/index.php line 36 OC::handleRequest()

Caused by:

PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR: column "poll_option_hash" of relation "oc_polls_options" does not exist LINE 1: ...options" ("poll_id", "order", "poll_option_text", "poll_opti... ^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101 PDOStatement->execute(null)
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1153 Doctrine\DBAL\Driver\PDO\Statement->execute()
  3. /var/www/html/lib/private/DB/Connection.php line 295 Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354 OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", [2,1,"Een","bcba ... "], [1,1,2,2])
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280 Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326 OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 138 OC\DB\QueryBuilder\QueryBuilder->executeStatement()
  8. /var/www/html/custom_apps/polls/lib/Db/OptionMapper.php line 51 OCP\AppFramework\Db\QBMapper->insert(["OCA\Polls\Db ... e])
  9. /var/www/html/custom_apps/polls/lib/Service/OptionService.php line 150 OCA\Polls\Db\OptionMapper->insert(["OCA\Polls\Db ... e])
  10. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Service\OptionService->add(2, 0, "Een", 0)
    1. /var/www/html/custom_apps/polls/lib/Controller/BaseController.php line 87 OCA\Polls\Controller\OptionController->OCA\Polls\Controller{closure}(" sensitive parameters replaced ")
    2. /var/www/html/custom_apps/polls/lib/Controller/OptionController.php line 58 OCA\Polls\Controller\BaseController->responseCreate(["Closure"])
    3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Polls\Controller\OptionController->add(2, 0, "Een", 0)
    4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController(["OCA\Polls\Co ... "], "add")
    5. /var/www/html/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Polls\Co ... "], "add")
    6. /var/www/html/lib/private/Route/Router.php line 315 OC\AppFramework\App::main("OCA\Polls\Con ... r", "add", ["OC\AppFramewo ... "], ["polls.option.add"])
    7. /var/www/html/lib/base.php line 1058 OC\Route\Router->match("/apps/polls/option")
    8. /var/www/html/index.php line 36 OC::handleRequest()

POST /apps/polls/option from 84.82.27.46 by jan_rhebergen at 2023-06-09T23:08:41+00:00

bburdette commented 1 year ago

upgraded 23->24->25 and couldn't add poll options, users couldn't vote in polls. occ polls:db:rebuild appears to have fixed it for me too.

ttenroK commented 1 year ago

That's bad. Without it, I can only guess what the error can be.

Just a try: call occ polls:db:rebuild to check or fix the db structure.

Unfortunately, I can't enter my own occ-commands on the managed nextcloud. I only can use predefined occ-commands. I'll contact the support of my managed nextcloud so that they will enter the command.

github-actions[bot] commented 1 year ago

This issue is marked as stale, because it had no activity in the last 30 days. It will be closed in 5 days.

github-actions[bot] commented 5 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.