[kronolith] Can't add or edit events in dynamic view Horde webmail 5.2.2, Kronolith 4.2.2
Jan Schneider
jan at horde.org
Wed Sep 24 08:05:50 UTC 2014
Zitat von Eric Van Bocxlaer <evb at ping.be>:
>> Zitat von Eric Van Bocxlaer <evb at ping.be>:
>>
>>> Hi,
>>>
>>> For some time now I can't edit or add events in the dynamic view. No
>>> problem in editing or adding in the simple view!
>>>
>>> So I did some debug in FireBug and the reason is a undefined
>>> 'date_format' in the javascript file kronolith.js, function getDate:
>>> getDate: function(what) {
>>> var dateElm, timeElm, date, time;
>>> if (what == 'start') {
>>> dateElm = 'kronolithEventStartDate';
>>> timeElm = 'kronolithEventStartTime';
>>> } else {
>>> dateElm = 'kronolithEventEndDate';
>>> timeElm = 'kronolithEventEndTime';
>>> }
>>> date = Date.parseExact($F(dateElm), Kronolith.conf.date_format)
>>> || Date.parse($F(dateElm));
>>> if (date) {
>>> time = Date.parseExact($F(timeElm), Kronolith.conf.time_format);
>>> if (!time) {
>>> time = Date.parse($F(timeElm));
>>> }
>>> if (time) {
>>> date.setHours(time.getHours());
>>> date.setMinutes(time.getMinutes());
>>> }
>>> }
>>> return date;
>>> },
>>>
>>> Kronolith.conf.date_format is for some reason undefined.
>>> When I look via FireBug into the object 'Kronolith' I see two child
>>> objects 'conf' and 'text'. In the child object 'conf' I see a
>>> defined 'time_format', but no 'date_format'.
>>> When I define via FireBug a 'date_format', everything is working, I
>>> can add and edit events in the dynamic view!
>>>
>>> I searched but did not (yet) found where the configuration
>>> information is read and putted in the 'Kronolith' object?
>>> Can someone guid me to find the correct code?
>>
>> See below, it's probably the same problem, because the date format
>> depends on the current locale.
>>
>>> During my search I verified the global settings of Horde for the
>>> date_format, date_format_mini and the time_format. There are all set!
>>> Some remark though, when I take these lists I can see entries, but
>>> also some empty lines. The filled in lines and the empty lines are
>>> corresponding with the enum array in prefs.php.
>>> Example date_format list:
>>> 09/20/14
>>> 2014-09-20
>>> 20/09/2014
>>> Saturday 20 September 2014
>>> Saturday, September 20, 2014
>>> Saturday, 20. September 2014
>>> Saturday, 20 September 2014
>>> empty line
>>> empty line
>>> empty line
>>> empty line
>>> empty line
>>> Sat 20 Sep 2014
>>> Sat 09/20/14
>>> Sat 2014-09-20
>>> The rest of the lines are empty
>>>
>>> Why these empty lines and why the weekdays/months are not in dutch?
>>> Everything else is translated but not the weekdays and months?
>>>
>>> Regards,
>>
>> Some of those entries depend on your current locale. If you don't see
>> expected date strings, make sure you have the system locales for your
>> current language installed.
>>
>> --
>> Jan Schneider
>> The Horde Project
>> http://www.horde.org/
>> https://www.facebook.com/hordeproject
>>
>> --
>> kronolith mailing list
>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org
>
> I verified the system locale on my server, it was correctly set to
> 'Dutch (Belgium)' the same as my selected language when I log in
> Horde webmail and the same as the selected language in the horde
> global settings.
It doesn't matter what you set the locale to, if the locale isn't installed.
> I found a file Registry.php, function setLanguage. I added some php
> error logging and found that the language
> returned from this function is 'nl_BE'.
Then this is the preferred language set by your browser, but it's not
supported by Horde and maybe not by your system either (see above).
I'm not even sure how the language got so far in the code, other than
on the login screen, because logging in should only be possible with
one of the languages we actually support.
> Where can I start to debug this thing?
> The server is a windows system running apache24 and horde webmail
> installed via pear.
Well, that's an important information too. Windows' locale support
isn't actually very good, so some date formats may not be available to
you at all. And frankly, I haven't tested a recent Horde version on a
Windows system in years, so I'm not even sure if it still works.
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
More information about the kronolith
mailing list