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

Can't save calendar entry - Czech datetime format #26

Closed
jakubdibala opened this issue Nov 25, 2015 · 3 comments
Closed

Can't save calendar entry - Czech datetime format #26

jakubdibala opened this issue Nov 25, 2015 · 3 comments

Comments

@jakubdibala
Copy link

Hi,

we can't save calendar entry, because of error in file /protected/modules/calendar/models/CalendarEntry.php on line 141. It tries to create DateTime object from string for example "15. 12. 2015". You probably must parse this string in "d. m. Y" format.

Thanks for reply.

@luke-
Copy link
Contributor

luke- commented Nov 25, 2015

HI,

can you please test it on our Hosting with same locale/language?

www.humhub.org/en/hosting

@jakubdibala
Copy link
Author

I did. Same result.

Here is exception from log:

exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (27. 11. 2015) at position 0 (2): Unexpected character' in /srv/www/htdocs/wedostest/modules/calendar/models/CalendarEntry.php:141 Stack trace: #0 /srv/www/htdocs/wedostest/modules/calendar/models/CalendarEntry.php(141): DateTime->__construct('27. 11. 2015') #1 [internal function]: humhub\modules\calendar\models\CalendarEntry->validateEndTime('end_datetime', NULL) #2 /srv/humhub/protected/vendor/yiisoft/yii2/validators/InlineValidator.php(69): call_user_func(Array, 'end_datetime', NULL) #3 /srv/humhub/protected/vendor/yiisoft/yii2/validators/Validator.php(240): yii\validators\InlineValidator->validateAttribute(Object(humhub\modules\calendar\models\CalendarEntry), 'end_datetime') #4 /srv/humhub/protected/vendor/yiisoft/yii2/base/Model.php(352): yii\validators\Validator->validateAttributes(Object(humhub\modules\calendar\models\CalendarEntry), Array) #5 /srv/www/htdocs/wedostest/modules/calendar/controllers/EntryController.php(82): yii\base\Model->validate() #6 [internal function]: humhub\modules\calendar\controllers\EntryController->actionEdit() #7 /srv/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array) #8 /srv/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array) #9 /srv/humhub/protected/vendor/yiisoft/yii2/base/Module.php(455): yii\base\Controller->runAction('edit', Array) #10 /srv/humhub/protected/vendor/yiisoft/yii2/web/Application.php(84): yii\base\Module->runAction('calendar/entry/...', Array) #11 /srv/humhub/protected/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(humhub\components\Request)) #12 /srv/www/htdocs/wedostest/index.php(19): yii\base\Application->run() #13 {main}

Do you need any additional info?

@CCRS-WEB
Copy link

CCRS-WEB commented Dec 4, 2015

i made a quick fix with normalize date, remove special chars and accents. Depends on your language settings

@luke- luke- closed this as completed in e6e6cd4 Dec 21, 2015
kristianlm added a commit to Societec/humhub-modules-calendar that referenced this issue Dec 4, 2017
this solves humhub#26 in a sense, but it's ugly.

also: the calcard view isn't updated, so changes made to the events
will not be visible to the user after editing unless they his reload
page!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants