-
Notifications
You must be signed in to change notification settings - Fork 46
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
Comments
HI, can you please test it on our Hosting with same locale/language? |
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? |
i made a quick fix with normalize date, remove special chars and accents. Depends on your language settings |
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!
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.
The text was updated successfully, but these errors were encountered: