Unterminated kendo min scripts cause error when combining script files

6 posts, 1 answers
  1. Dan
    Dan avatar
    9 posts
    Member since:
    Feb 2011

    Posted 22 May 2012 Link to this post

    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? 
  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 25 May 2012 Link to this post

    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!
  3. Eric
    Eric avatar
    8 posts
    Member since:
    Aug 2008

    Posted 19 Jun 2012 Link to this post

    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.
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 20 Jun 2012 Link to this post

    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!
  5. Oladipo
    Oladipo avatar
    2 posts
    Member since:
    Aug 2008

    Posted 06 Aug 2012 Link to this post

    how do i bundle the kendo javascript files in aspnet mvc4?
  6. Dan
    Dan avatar
    9 posts
    Member since:
    Feb 2011

    Posted 06 Aug 2012 Link to this post

    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.

Back to Top