Forums › Forums › OroCRM › OroCRM – Programming Questions › Date Error – French Language – Urgent Issue
This topic contains 13 replies, has 6 voices, and was last updated by thinh2010 6 years, 8 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- December 15, 2016 at 11:54 pm #25317
Hi,
I am having a peculiar problem.
When I change the locale and Language to French I am not able to select any date using the Datetime picker control in Tasks, Calendar Events, etc…
When I started getting this issue I checked in your demo application (http://demo.orocrm.com) and the error is there as well. Please find the screenshot attached from your demo application.
- CreatorTopic
- AuthorReplies
- December 19, 2016 at 4:51 am #25318
Hi Team,
I am also facing the same issue when language is French. it works fine in previous OroCRM version but in the new version facing this issue. I guess the issue is in oro.min.js present in web/js.Because when i tried replacing this js file with previous version’s js file it worked for Dates & also gets saved to DB successfully(My_application_PATH/task/create) but gives some js errors when loading any other pages. I tried looking at changes from previous version of js with this new js but could not get much idea in how to resolve this Datepicker validation issue.Please need help in knowing what changes need to be done in new oro.min.js as i cannot use older version of js since many other functionalities would not work.
The problem faced here is most of Months in DatePicker would have special characters in it. Ex: D`ec . So OROCRM gives that error saying that not a valid date. For other months which does not involve any special characters it does not throw any errors & works fine.
Kindly need help in this problem.
Thanks & Regards,
Shreyas SDecember 19, 2016 at 8:48 pm #25319Hi
For now http://demo.orocrm.com is working on 1.10.8 version of orocrm, but it is not the latest version. I have checked the issue on 1.10.12, it works fine. Please use it in your development.
December 20, 2016 at 3:24 am #25320Hello,
Thank you guys for the bug report. Confirm, that issue still exists in master and in latest 1.10.* versions. And you are right, it is related to oro.min.js. The build file is loaded before locale settings is initialized and it leads to the bug.
The quickest workaround would be to delete web/js/oro.min.js. It will slightly affect load time of application (all JS-modules will be loaded on demand), but locale settings will be initialized properly. To build oro.min.js again, you can execute command in root folder of project:
Shell1app/console oro:requirejs:buildWe are working on a proper fix. It will be applied to next bug fix releases for all supported versions.
January 2, 2017 at 4:01 am #25321Hi Hryhorii,
Thanks for the suggestion.i tried following the steps of deleting the oro.min.js file from web/js & using the command: app/console oro:requirejs:build . But this throws me runtime exception as given below:
123[RuntimeException]Error: TypeError: Cannot call method 'indexOf' of nullat Function.build.makeAbsPath (/websites/shreyas/crm-application/web/bundles/ororequirejs/lib/r.js:26494:18)Please find screenshot for the same:
So, when i go back to the web/js i cannot find the generated oro.min.js due to the exception that is occured. I tried placing back oro.min.js which was taken back up before removing in web/js. And then try executing this command but it gives same error.
Kindly need help in how to fix this issue.
Thanks & Regards,
Shreyas SJanuary 3, 2017 at 12:41 am #25322Hi,
I’ve the same problem.
I delete the file oro.min.js and execute the command but the problem remains the same but only for months with an accentJanuary 3, 2017 at 3:13 am #25323Hi,
I see that proposed solution was not clear enough, sorry for that.The idea was to remove (or better rename) original oro.min.js. And work without it until upgrade to next stable version. It will slightly affect load time of application (all JS-modules will be loaded on demand), but locale settings will be initialized properly.
The bug is already fixed in master. And next bug fix release 1.10.13 of OroPlanform will also contain the fix.
Creating new oro.min.js won’t fix the issue. I have provided rebuild command just in case you are not satisfied with loading time and decided to use another language for awhile, until the new release.
January 3, 2017 at 4:53 am #25324Hi,
delete oro.min.js and work without it is good. The load time is acceptable for us. We will see in everyday useWaiting for next version
Thanks
January 4, 2017 at 2:19 am #25325Thanks Hryhorii,
Its working fine now after deleting the js.
Thanks & Regards,
Shreyas SJune 24, 2017 at 1:10 am #25326Hi,
Any news for this error? I am facing this problem too. I am using oro platform version 2.0.11
June 26, 2017 at 7:08 am #25327Hello,
That issue was fixed long time ago. And I see that the fix is applied to 2.0.* version as well.
https://github.com/orocrm/platform/commit/8804ddb285e7622e2d5d2afd8dfe20b7d7722b01If you are still experiencing date validation problem for a French locale, it is, most likely, some other issue.
Could you specify steps to reproduce for your case?July 3, 2017 at 8:22 pm #25328Hello,
I added Vietnamese language (System / Localization / Languages)
Then I go to System / Configuration / Language Settings and set the default language is VietnameseFrom that, the date time field is always error.
Could you please check?
July 13, 2017 at 12:53 am #25329Hello thinh2010,
Confirm, the issue, that you’ve described, exists in OroPlatform 2.0.* version.
The library Moment.js v2.8.3, that we use there for datetime manipulation, can not match dates, kind of “Thg 7 11, 2017”, to the format “MMM D, YYYY” in Vietnamese languages and English locale.We can not update the library for OroPlatform 2.0.* without braking backward compatibility.
Soon, is going to be realized OroPlatform 2.3 LTS version. It uses latest version of Moment.js and your issue can not be reproduced there.
I recommend to update your instance once it is released
July 13, 2017 at 2:30 am #25330Thank Hryhorii,
I just want to give more information, I didn’t check the code but when I go to System / Configuration / Localization, I set the Locale and Primary Location is Vietnamese and Vietnam, then the date time field can works normally.
- AuthorReplies
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.