This is a migrated thread and some comments may be shown as answers.

Unterminated kendo min scripts cause error when combining script files

5 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 23 May 2012, 02:56 AM
I use the Telerik MVC ScriptRegistrar to combine and compress all my javascript files.  I noticed that unlike the Telerik MVC javascript files, the contents of kendo minified javascript files are not terminated by a semicolon.  So when the ScriptRegistrar combines the javascript files, whatever follows my kendo.web.min.js file fails to load properly.  In my specific case, it was telerik.common.js.

I didn't notice this until I tried to publish my files to go live, since in debug mode, the ScriptRegistrar does not use the min files.  I fixed it by just adding a semicolon in.

Is there something I'm doing wrong, or is this just a pitfall of combining javascript files into one?  Should Kendo min files have that semicolon?  Or maybe this is a ScriptRegistrar shortcoming? 

5 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 25 May 2012, 10:00 AM
Hello Dan,

Thank you for bringing this up. We started adding the missing semicolons to the kendo scripts, so upcoming builds won't have this problem. Your Telerik points have been updated.

Greetings,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Eric
Top achievements
Rank 2
answered on 19 Jun 2012, 12:25 PM
Will this be fixed in the Q2'12 Beta?

When using the TabStrip control in conjuction with ASP.NET MVC 4 Bundling and Minification I receive the following Javascript error when selecting tabs:

Object doesn't support property or method 'split'

I have seen the same script error when selecting folders in a tree view as well. When I reference the script directly with a script tag, bypassing the ASP.NET MVC 4 Bundling and Minification, I do not encounter the error.
0
Alex Gyoshev
Telerik team
answered on 20 Jun 2012, 08:39 AM
Hello Eric,

The semicolons should be available in the beta of the Kendo MVC wrappers, as well as in the upcoming Q2'12 beta.

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Oladipo
Top achievements
Rank 1
answered on 06 Aug 2012, 06:14 PM
how do i bundle the kendo javascript files in aspnet mvc4?
0
Dan
Top achievements
Rank 1
answered on 06 Aug 2012, 06:30 PM
If you have a license for the Telerik asp.net mvc extensions, you can use the scriptregistrar.

There's also the Kendo UI custom download page for combining select libraries together.

Then there are a bunch of other utilities to minify and combine scripts and css.

I like the scriptregistrar personally.

Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Eric
Top achievements
Rank 2
Oladipo
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Share this question
or