Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polls with expire date could not be created/edited #461

Closed
nextgen-networks opened this issue Dec 23, 2018 · 19 comments
Closed

Polls with expire date could not be created/edited #461

nextgen-networks opened this issue Dec 23, 2018 · 19 comments
Assignees
Projects
Milestone

Comments

@nextgen-networks
Copy link

What is going wrong?

Describe the bug
Polls created with an expire date are not created/could not be edited.

To Reproduce
use an poll with an expire date

Expected behavior
polls should be created/edited regardless if the utilize n expire date or not

Information about your polls installation

Polls version? 0.9.5 / Fresh installation

How did you install this version?(Appstore or describe installation)
Appstore

Information about your Instance of Nextcloud/ownCloud

Nextcloud or ownCloud?
NC

Which Version?
15.0.0

Server configuration

Operating system: Ubuntu 16.04.5

Web server: Apache 2

Database: MySQL 5.5.27

PHP version: 7.2

Signing status: Ok

@dartcafe
Copy link
Collaborator

I cannot reproduce this. Creating a pol lwith an expiry date is editable and I can place votes. Please submit more information and may be a log file entry and/or screen shots.

@nextgen-networks
Copy link
Author

thx for fast reply - I'll provide info in the next few days - now @ PoC buildup for 35c3

@v1r0x
Copy link
Collaborator

v1r0x commented Dec 24, 2018

@nextgen-networks you can provide your info at 35c3. I'll be there and (hopefully) working on polls 😉

@nextgen-networks
Copy link
Author

@v1r0x :-D
Great to see you in person at 35c3 - just give me a hint where you're located at when you've arrived or call dect 2069

@v1r0x
Copy link
Collaborator

v1r0x commented Dec 27, 2018

@nextgen-networks I'm either in heaven or walking around doing angel stuff or in talks. Unfortunately, I don't have a DECT :(

@jio3252
Copy link

jio3252 commented Dec 31, 2018

I can confirm that the expire option does not work.

When using an expire date the update/create button just spinns forever and never finishes.

I am using https://hub.docker.com/_/nextcloud with the newest version

@dartcafe
Copy link
Collaborator

dartcafe commented Jan 1, 2019

I cannot confirm. Works here as designed on several instances. Some more information would help.
Configuration, screen shots, ...

@jio3252
Copy link

jio3252 commented Jan 1, 2019

poll

"Writing Poll" will keep appearing indefinitely.

When I do not ckeck the expire box everything works fine

The server runs a default config with mariadb

@gmk1981
Copy link

gmk1981 commented Jan 10, 2019

Hi,

i have the same problem. When i check the expiration field, the poll could not be created. The status wheel rotates endlessly and nothing happens.
Server: Ubuntu 16.04
Nextcloud:Version: 14.0.4.2
PHP Version: 7.0.32
DB: mysql

grafik

@dartcafe
Copy link
Collaborator

Anyone with some hints?
Server errors, console log errors?

@fnadeau
Copy link

fnadeau commented Jan 12, 2019

I have the same issue. Works fine if no expiration is given.

A nice addition would be to have a warning on the web page that "something went wrong". The only thing I have is the working button. No info is given that it didn't work.

Would like to help more, but SQL and JS are not my strong suits. The mariadb setup says that the expire field is of datetime format and doc doesn't says it support the timezone in it: https://mariadb.com/kb/en/library/datetime/

so 2019-01-13T21:00:00.000Z doesn't look valid.

I hope it helps

[index] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO oc_polls_events(title,description,type,is_anonymous,full_anonymous,allow_maybe,access,expire,owner,created,hash) VALUES(?,?,?,?,?,?,?,?,?,?,?)' with params ["test titre", "test descrip", 0, 0, 0, 0, "public", "2019-01-13T21:00:00.000Z", "fnadeau", "2019-01-12 21:15:45", "L67SGXXn1vH8araA"]:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2019-01-13T21:00:00.000Z' for column 'expire' at row 1 at <>

  1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 128
    convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
  2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 177
    driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: "test titre" ... "})
  3. /var/www/html/lib/public/AppFramework/Db/Mapper.php line 256
    execute()
  4. /var/www/html/lib/public/AppFramework/Db/Mapper.php line 130
    execute("INSERT INTO `*P ... )", ["test titre","t ... "])
  5. /var/www/html/custom_apps/polls/lib/Controller/ApiController.php line 383
    insert(OCA\Polls\Db\Event {id: null})
  6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 166
    writePoll({id: 0,hash: "", ... "}, {pollDates: [{id ... ]}, [], "create")
  7. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Polls\Contro ... }}, "writePoll")
  8. /var/www/html/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Polls\Contro ... }}, "writePoll")
  9. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\Polls\Controller\ApiController", "writePoll", OC\AppFramework\ ... {}, {_route: "polls.api.write_poll"})
  10. <>
    __invoke({_route: "polls.api.write_poll"})
  11. /var/www/html/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "polls.api.write_poll"})
  12. /var/www/html/lib/base.php line 987
    match("/apps/polls/write")
  13. /var/www/html/index.php line 42
    handleRequest()

POST /apps/polls/write
from 172.18.0.3 by fnadeau at 2019-01-12T21:15:45+00:00

@dartcafe
Copy link
Collaborator

so 2019-01-13T21:00:00.000Z doesn't look valid.

True. This is not valid. But on my site, the date is formattet correctly. The time converting maybe buggy and is horrible, because of the time zones. I will follow the path from crating to persisting, but not in the next two weeks.

Thanks @fnadeau This information helps.

What is your locale setting?

@dartcafe
Copy link
Collaborator

Ah: Note to myself, check error handling...

@dartcafe
Copy link
Collaborator

OK. I got behind this. Seems like MariaDB is more strict, than MySQL. MySQL stores the datetime information more tolerant. Nvertheless, the datetime format misses the correct timezone information. I think, it is better to use string or timestamp as field type.

To dos:

  • Migrate field expire from datetime to timestamp (Current value is stored in UTC)
  • convert poll.event.expirationDate to timezone before saving to DB on the vue side
  • convert expiration date from timestamp to date object on loading polls

@fnadeau
Copy link

fnadeau commented Jan 16, 2019

What is your locale setting?

French Canadian, if that matters...

@dartcafe
Copy link
Collaborator

Please be patient. I am 15.000 km from home. Will investigate and fix this, when I am back.

@dartcafe
Copy link
Collaborator

@nextgen-networks Are you able to test the branch from the #514 PR?

@dartcafe
Copy link
Collaborator

@fnadeau, @gmk1981, @jio3252 Maybe you can confirm or deny the fix, too. I don't have the problem on my instances and I am limited in configure the DB server.
My MySQL accepts the time format like '2019-01-13T21:00:00.000Z'.

@dartcafe dartcafe added this to the 0.10.0 milestone Feb 10, 2019
@dartcafe dartcafe self-assigned this Feb 10, 2019
@dartcafe dartcafe added this to Needs triage in Bugs via automation Feb 10, 2019
@dartcafe dartcafe moved this from Needs triage to in Progress in Bugs Feb 10, 2019
dartcafe added a commit that referenced this issue Feb 13, 2019
fix expire date could not be created/edited (#461)
@dartcafe
Copy link
Collaborator

Merged

Bugs automation moved this from in Progress to Closed Feb 13, 2019
dartcafe added a commit that referenced this issue Jul 31, 2019
* Change actions in vote page
#420

* Switched disallow maybe to allow.

* fixed width on date poll cells

* Refactoring ApiController

* Update lib/Controller/ApiController.php

Co-Authored-By: dartcafe <github@dartcafe.de>

* Set 1 to default in allow_maybe because of existing polls

* Revert accidentally included desing tests.

* Fix adding allow_maybe upon migration from prior version.

* Last CSS fix

* Update max-version to current dev version 16

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>

* allow option and update packages

* Update CHANGELOG.md

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* poll width

* [tx-robot] updated from transifex

* Increase version for fix.

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Fix migration to handle problem after migration error

* fix link to create poll on empty main site

* [tx-robot] updated from transifex

* fix color variable name in list.scss

Hi, I noticed the variable name --text-maxcontrast has been used. This variable hasn't actually been defined anywhere, so I have changed it to the variable name used by nextcloud server.

* Fix broken migration after orphaned votes

* #454 fix PostgeSQL with workaround

* Changed QueryBuilder where

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* fix #464

* Refactoring ApiController

* Update lib/Controller/ApiController.php

Co-Authored-By: dartcafe <github@dartcafe.de>

* allow option and update packages

* recompile

* Updated comments

* Cleanup

* Code tidy

* Finally

* Some more scutinizer fixes

* Some scrutinizer fixes

* Fixing more scutinizer hints

* Some afterwork

* Optimization

* Grammar

* compile buuild

* Update OptionMapperTest.php

* Test

* Split api and system controller

* more refactoring

* fix [no ci]

* Progress

* remove test strings

* Update christophwurst/nextcloud requirement from ^12.0 to ^15.0

Updates the requirements on [christophwurst/nextcloud](https://github.com/ChristophWurst/nextcloud_composer) to permit the latest version.
- [Release notes](https://github.com/ChristophWurst/nextcloud_composer/releases)
- [Commits](https://github.com/ChristophWurst/nextcloud_composer/commits/v15.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update axios requirement from ^0.17.1 to ^0.18.0

Updates the requirements on [axios](https://github.com/axios/axios) to permit the latest version.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/commits/v0.18.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update file-loader requirement from ^1.1.6 to ^2.0.0

Updates the requirements on [file-loader](https://github.com/webpack-contrib/file-loader) to permit the latest version.
- [Release notes](https://github.com/webpack-contrib/file-loader/releases)
- [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/file-loader/commits/v2.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update vue-loader requirement from ^13.7.3 to ^15.4.2

Updates the requirements on [vue-loader](https://github.com/vuejs/vue-loader) to permit the latest version.
- [Release notes](https://github.com/vuejs/vue-loader/releases)
- [Changelog](https://github.com/vuejs/vue-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-loader/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Design updates

* Update webpack requirement from ^3.12.0 to ^4.28.3

Updates the requirements on [webpack](https://github.com/webpack/webpack) to permit the latest version.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/commits/v4.28.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* [tx-robot] updated from transifex

* Update file-loader requirement from ^2.0.0 to ^3.0.1

Updates the requirements on [file-loader](https://github.com/webpack-contrib/file-loader) to permit the latest version.
- [Release notes](https://github.com/webpack-contrib/file-loader/releases)
- [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/file-loader/commits/v3.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update environment

* change file structure and js/vue code style

* lint:fix

* move .jshintrc

* Revert "move .jshintrc"

This reverts commit 30ff56c.

* Trying to get scrutinizer quiet

* Updates env

* Made a detour to rename files from lower case to camel case on windows

* typo fix

* appstore fix

* fine tuning

* final changes

* chmod -x to sone files

* rearrange Makefile

* [tx-robot] updated from transifex

* Update README.md

* Initial

* [tx-robot] updated from transifex

* Fix #478

* progress

* Added PopoverMenu, VueClipboard, vClickOutside

* Added removing polls
Vue app is now index of app

* [tx-robot] updated from transifex

* Added modal confirmation dialog
Added comment counter
Added voting indicator

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Update nextcloud-vue requirement from ^0.4.6 to ^0.6.0

Updates the requirements on [nextcloud-vue](https://github.com/nextcloud/vue-components) to permit the latest version.
- [Release notes](https://github.com/nextcloud/vue-components/releases)
- [Commits](https://github.com/nextcloud/vue-components/commits/v0.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* [tx-robot] updated from transifex

* fix build
grey icons

* design update

* Fix comment counter

* Added CSRF condition on writing functions
Changes to API Calls

* Some updates

* fix test

* Update composer.json

* fix invalid create button after validation #498

* Update overview screenshot

* bring back admin edit to menu

* Added clone polls

* Removed logging

* Little optimisation and tidy

* Shift all dates of a date poll with given step and unit

* Updates

* removed some obsolete files and functions.

* Progress

* remove test strings

* Update version and readme

* Added function to popovermenu

* Updated screenshots

* quick fix for  votes without click. #479

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* display access with icon instead of text #497

* Changed list order

* fix query params in eventmapper

* fix double closing bracket

* tidy css

* reduce icon size

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* forgotten commit

* fix expire date could not be created/edited (#461)

* #511 - added missing access check

* Updated change log

* Update screenshot

* Updated screenshots

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Update vue-clipboard2 requirement from ^0.2.1 to ^0.3.0

Updates the requirements on [vue-clipboard2](https://github.com/Inndy/vue-clipboard2) to permit the latest version.
- [Release notes](https://github.com/Inndy/vue-clipboard2/releases)
- [Changelog](https://github.com/Inndy/vue-clipboard2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Inndy/vue-clipboard2/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Remove sourcemaps from production build

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* resize type icons

* [tx-robot] updated from transifex

* Update nextcloud-vue requirement from ^0.6.0 to ^0.7.0

Updates the requirements on [nextcloud-vue](https://github.com/nextcloud/nextcloud-vue) to permit the latest version.
- [Release notes](https://github.com/nextcloud/nextcloud-vue/releases)
- [Commits](nextcloud-libraries/nextcloud-vue@v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* fix and beautitfy

* Update CHANGELOG.md

* HTML and CSS tidy on list page

* Change overflow-x of table element

* Update build system
+ vue@2.6.7
+ @babel/core@7.3.4
+ acorn@6.1.0
+ eslint@5.14.1
+ vue-loader@15.6.4
+ @babel/preset-env@7.3.4
+ eslint-plugin-import@2.16.0
+ stylelint-scss@3.5.4
+ eslint-loader@2.1.2
+ eslint-plugin-vue@5.2.2
+ vue-template-compiler@2.6.7
+ webpack-cli@3.2.3
+ webpack@4.29.5

* Update nextcloud-vue requirement from ^0.7.0 to ^0.8.0

Updates the requirements on [nextcloud-vue](https://github.com/nextcloud/nextcloud-vue) to permit the latest version.
- [Release notes](https://github.com/nextcloud/nextcloud-vue/releases)
- [Commits](nextcloud-libraries/nextcloud-vue@v0.7.0...v0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* [tx-robot] updated from transifex

* Update nextcloud-vue 0.8.0

* use min-height to garantee display of popovermenu

* Update version info and changelog

* Added tooltips

* late delivery

* updated translation

* lint fixes

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Translators hints

* Repckaging for #532
- [ ] Update date in CHANGELOG.md before release

* IE11 hint

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Update nextcloud-vue requirement from ^0.8.0 to ^0.9.0

Updates the requirements on [nextcloud-vue](https://github.com/nextcloud/nextcloud-vue) to permit the latest version.
- [Release notes](https://github.com/nextcloud/nextcloud-vue/releases)
- [Commits](nextcloud-libraries/nextcloud-vue@v0.8.0...v0.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* add release date

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Refactoring models

* Update

* Moving from depricated OCP\AppFramework\Db\Mapper to OCP\AppFramework\Db\QBMapper 
Removing unused functions

* Deleted too much

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Update nextcloud-axios requirement from ^0.1.3 to ^0.2.0

Updates the requirements on [nextcloud-axios](https://github.com/ChristophWurst/nextcloud-axios) to permit the latest version.
- [Release notes](https://github.com/ChristophWurst/nextcloud-axios/releases)
- [Commits](nextcloud-libraries/nextcloud-axios@v0.1.3...v0.2.0)

* Updated version and dependencies

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* Fixed typo

Reported at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#lt_LT/polls/129942219

Signed-off-by: Mark Ziegler <mark.ziegler@rakekniven.de>

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex

* [tx-robot] updated from transifex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bugs
Closed
Development

No branches or pull requests

6 participants