nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.2k stars 273 forks source link

Unable to open Board because of exception from Card due date #5598

Closed FHFS closed 6 months ago

FHFS commented 7 months ago

How to use GitHub

Describe the bug I messed around with setting "add due date". In a hurry I tried to correct the date by typing in a part of the date. This was saved. Now I cannot open the Board, and I don't know how to delete the card with the invalid date.

Please help me remove the card with the invalid data.

"Exception","Message":"Failed to parse time string (20132-11-03 18:00:00) at position 12 (1): Double time specification"

This year might be a bit far into the future 20132-11-03

To Reproduce I am not sure how I did this, and I am not sure on which version I did this. I've tried to reproduce it in Deck 1.12.2. However the illegal date was corrected to a valid date.

Expected behavior Deck 1.12.2 which I am on now behaves as expected and does not allow the illegal date to be saved.

Client details:

Server details **Operating system**: Armbian **Web server:** nginx **Database:** postgres **PHP version:** 8\.2.15 **Nextcloud version:** 28\.0.2 **Where did you install Nextcloud from:** docker container **Signing status:** ``` No errors have been found. ``` **List of activated apps:** ``` Enabled: - activity: 2.20.0 - bruteforcesettings: 2.8.0 - calendar: 4.6.4 - circles: 28.0.0-dev - cloud_federation_api: 1.11.0 - cloud_py_api: 0.1.9 - comments: 1.18.0 - contacts: 5.5.1 - contactsinteraction: 1.9.0 - dav: 1.29.1 - deck: 1.12.2 - event_update_notification: 2.3.0 - federatedfilesharing: 1.18.0 - federation: 1.18.0 - files: 2.0.0 - files_external: 1.20.0 - files_pdfviewer: 2.9.0 - files_reminders: 1.1.0 - files_sharing: 1.20.0 - files_trashbin: 1.18.0 - files_versions: 1.21.0 - firstrunwizard: 2.17.0 - logreader: 2.13.0 - lookup_server_connector: 1.16.0 - mail: 3.5.6 - mediadc: 0.3.8 - memories: 6.2.2 - nextcloud_announcements: 1.17.0 - notes: 4.9.2 - notifications: 2.16.0 - oauth2: 1.16.3 - password_policy: 1.18.0 - privacy: 1.12.0 - provisioning_api: 1.18.0 - recommendations: 2.0.0 - related_resources: 1.3.0 - richdocuments: 8.3.1 - serverinfo: 1.18.0 - settings: 1.10.1 - sharebymail: 1.18.0 - support: 1.11.0 - survey_client: 1.16.0 - suspicious_login: 6.0.0 - systemtags: 1.18.0 - text: 3.9.1 - theming: 2.3.0 - twofactor_backupcodes: 1.17.0 - twofactor_totp: 10.0.0-beta.2 - unroundedcorners: 1.1.2 - updatenotification: 1.18.0 - user_status: 1.8.1 - viewer: 2.2.0 - workflowengine: 2.10.0 Disabled: - admin_audit: 1.18.0 - dashboard: 7.8.0 (installed 7.7.0) - encryption: 2.16.0 - files_rightclick: 0.15.1 (installed 1.6.0) - issuetemplate: 0.7.0 (installed 0.7.0) - photos: 2.4.0 (installed 2.3.0) - spreed: 17.1.3 (installed 17.1.3) - user_ldap: 1.19.0 - weather_status: 1.8.0 (installed 1.7.0) ``` **Nextcloud configuration:** ``` /var/www/html $ ./occ config:list system { "system": { "app.mail.smtp.timeout": 20, "debug": false, "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "password": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "my.domain.nl", "mync.duckdns.org" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "28.0.2.5", "overwrite.cli.url": "https:\/\/my.domain.nl", "overwriteprotocol": "https", "default_phone_region": "nl", "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_sendmailmode": "smtp", "mail_smtpauth": 1, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "loglevel": 0, "maintenance": false, "maintenance_window_start": 1, "theme": "", "app_install_overwrite": [ "richdocumentscode", "richdocumentscode_arm64", "memories", "issuetemplate" ], "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-aarch64-musl", "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-aarch64", "memories.gis_type": 2, "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg", "memories.vod.ffprobe": "\/usr\/bin\/ffprobe" } } ``` **Are you using an external user-backend, if yes which one:** not sure
Logs #### Nextcloud log (data/nextcloud.log) ``` { "reqId": "UvM1aGMrKy1sAmaYAOgI", "level": 3, "time": "2024-02-15T14:52:30+00:00", "remoteAddr": "172.22.0.3", "user": "fhfs", "app": "deck", "method": "GET", "url": "/apps/deck/stacks/5", "message": "Exception thrown: Exception", "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0", "version": "28.0.2.5", "exception": { "Exception": "Exception", "Message": "Failed to parse time string (20132-11-03 18:00:00) at position 12 (1): Double time specification", "Code": 0, "Trace": [ { "file": "/var/www/html/lib/public/AppFramework/Db/Entity.php", "line": 126, "function": "__construct", "class": "DateTime", "type": "->", "args": [ "20132-11-03 18:00:00" ] }, { "file": "/var/www/html/lib/public/AppFramework/Db/Entity.php", "line": 167, "function": "setter", "class": "OCP\\AppFramework\\Db\\Entity", "type": "->", "args": [ "duedate", [ "20132-11-03 18:00:00" ] ] }, { "file": "/var/www/html/custom_apps/deck/lib/Db/RelationalEntity.php", "line": 147, "function": "__call", "class": "OCP\\AppFramework\\Db\\Entity", "type": "->", "args": [ "setDuedate", [ "20132-11-03 18:00:00" ] ] }, { "file": "/var/www/html/lib/public/AppFramework/Db/Entity.php", "line": 75, "function": "__call", "class": "OCA\\Deck\\Db\\RelationalEntity", "type": "->", "args": [ "setDuedate", [ "20132-11-03 18:00:00" ] ] }, { "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php", "line": 321, "function": "fromRow", "class": "OCP\\AppFramework\\Db\\Entity", "type": "::", "args": [ [ 238, "content", "content", "content", 14, "plain", 1706278654, "fhfs", 1694165541, "fhfs", 2, false, "20132-11-03 18:00:00", false, 0, null ] ] }, { "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php", "line": 339, "function": "mapRowToEntity", "class": "OCP\\AppFramework\\Db\\QBMapper", "type": "->", "args": [ [ 238, "content", "content", "content", 14, "plain", 1706278654, "fhfs", 1694165541, "fhfs", 2, false, "20132-11-03 18:00:00", false, 0, null ] ] }, { "file": "/var/www/html/custom_apps/deck/lib/Db/CardMapper.php", "line": 160, "function": "findEntities", "class": "OCP\\AppFramework\\Db\\QBMapper", "type": "->", "args": [ [ "OC\\DB\\QueryBuilder\\QueryBuilder" ] ] }, { "file": "/var/www/html/custom_apps/deck/lib/Service/StackService.php", "line": 96, "function": "findAll", "class": "OCA\\Deck\\Db\\CardMapper", "type": "->", "args": [ 14, null, null, -1 ] }, { "file": "/var/www/html/custom_apps/deck/lib/Service/StackService.php", "line": 107, "function": "enrichStackWithCards", "class": "OCA\\Deck\\Service\\StackService", "type": "->", "args": [ [ "OCA\\Deck\\Db\\Stack", 14 ], -1 ] }, { "file": "/var/www/html/custom_apps/deck/lib/Service/StackService.php", "line": 157, "function": "enrichStacksWithCards", "class": "OCA\\Deck\\Service\\StackService", "type": "->", "args": [ [ [ "OCA\\Deck\\Db\\Stack", 13 ], [ "OCA\\Deck\\Db\\Stack", 12 ], [ "OCA\\Deck\\Db\\Stack", 29 ], [ "OCA\\Deck\\Db\\Stack", 14 ] ], -1 ] }, { "file": "/var/www/html/custom_apps/deck/lib/Controller/StackController.php", "line": 48, "function": "findAll", "class": "OCA\\Deck\\Service\\StackService", "type": "->", "args": [ "5" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 230, "function": "index", "class": "OCA\\Deck\\Controller\\StackController", "type": "->", "args": [ "5" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 137, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Deck\\Controller\\StackController" ], "index" ] }, { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 184, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Deck\\Controller\\StackController" ], "index" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Deck\\Controller\\StackController", "index", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "5", "deck.stack.index" ] ] }, { "file": "/var/www/html/lib/base.php", "line": 1069, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/deck/stacks/5" ] }, { "file": "/var/www/html/index.php", "line": 39, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/html/lib/public/AppFramework/Db/Entity.php", "Line": 126, "CustomMessage": "Exception thrown: Exception" } } ``` #### Browser log ``` ```
FHFS commented 7 months ago

Can anyone help me with deleting a card from the database? Please point me in the right direction.

FHFS commented 6 months ago

For anyone who needs to delete a card that is causing problems, heres my writeup.

  1. Open a bash in your postgres container as user postgres. I used Portainer.
  2. use psql to connect to the database. psql $POSTGRES_DB $POSTGRES_USER
  3. List the databases with \l
  4. Connect to the nextcloud database with \c nextcloud
  5. List tables with \dt
  6. View table structure with \d oc_deck_cards
  7. Run your query like SELECT * FROM oc_deck_cards WHERE duedate = '20132-11-03 18:00:00';
  8. Delete entries by id with DELETE FROM oc_deck_cards WHERE id = 238; or match with where DELETE FROM oc_deck_cards WHERE duedate = '22222-02-17 07:00:00';
  9. Profit