Minification failed. Returning unminified contents.

7 posts, 1 answers
  1. Alexandre
    Alexandre avatar
    20 posts
    Member since:
    Apr 2014

    Posted 09 Jun 2014 Link to this post

    Hi,

    I'm developping an ASP.NET MVC application using Kendo UI v2014.1.415.  Some of the Kendo controls are not rendering properly in Release mode. I check the the css bundle I found the following :
    /* Minification failed. Returning unminified contents.
    (27,35175): run-time error CSS1030: Expected identifier, found '.'
    (27,35182): run-time error CSS1031: Expected selector, found ')'
    (27,35182): run-time error CSS1025: Expected comma or open brace, found ')'
    */

    Here is the code from my bundle config :

     bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

                bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/Scripts/jquery.validate*"));

                // Use the development version of Modernizr to develop with and learn from. Then, when you're
                // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
                bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

                bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                          "~/Scripts/bootstrap.js",
                          "~/Scripts/respond.js"));

                bundles.Add(new StyleBundle("~/Content/css").Include(
                          "~/Content/bootstrap.css",
                          "~/Content/site.css"));

                //Kendo UI - Begin
                const string VersionKendo = "2014.1.415";
                const string KendoScriptFolder = "~/Scripts/kendo/" + VersionKendo + "/";
                const string KendoCssFolder = "~/Content/kendo/" + VersionKendo + "/";

                bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                    KendoScriptFolder + "kendo.all.min.js",
                    KendoScriptFolder + "cultures/kendo.culture.en-US.min.js",
                    KendoScriptFolder + "cultures/kendo.culture.fr-FR.min.js",
                    KendoScriptFolder + "kendo.aspnetmvc.min.js"
                    ));

                 bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
                    KendoCssFolder + "kendo.common.min.css", 
                    KendoCssFolder + "kendo.metro.min.css",
                    KendoCssFolder + "kendo.default.mobile.min.css"));
                
                // Clear all items from the default ignore list to allow minified CSS and JavaScript files to be included in debug mode
                bundles.IgnoreList.Clear();

                // Add back the default ignore list rules sans the ones which affect minified files and debug mode
                bundles.IgnoreList.Ignore("*.intellisense.js");
                bundles.IgnoreList.Ignore("*-vsdoc.js");
                bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
                //Kendo UI - End          

                BundleTable.EnableOptimizations = true;

    How can I fix this?




  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Jun 2014 Link to this post

    Hello Alexandre,

    Unfortunately from the provided details I am not able to determine the exact cause of the erroneous behavior. Can you please check whether the issue is eliminated when you upgrade to the latest service pack release (2014.1.528)?

    Let me know whether the problem is still there after migrating to the latest version.

    Kind regards,
    Sebastian
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Alexandre
    Alexandre avatar
    20 posts
    Member since:
    Apr 2014

    Posted 09 Jun 2014 in reply to Sebastian Link to this post

    The minifications errors occur with the file kendo.default.mobile.min.css.
    The UI problems that I mention is on the Grid page button, the image are missing when the website is deploy in Release mode, but work fine in Debug.

    I'll try the upgrade the first chance I get.
  5. Alexandre
    Alexandre avatar
    20 posts
    Member since:
    Apr 2014

    Posted 09 Jun 2014 in reply to Alexandre Link to this post

    Hi,

    I just upgrade to the latest service pack release (2014.1.528) and the problem still occur.
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 10 Jun 2014 Link to this post

    Hello again Alexandre,

    This is indeed an odd issue - do you still get the same minification error with the latest SP version? Also can you please check with your browser's developer tools what prevents the grid pager UI elements from being served properly? This information can help us find the source of the issue.

    If this does not help, the best means to proceed is to isolate a simplified working sample of your project and send it attached to a private support ticket. Thus we'll be able to investigate further and provide an appropriate explanation/fix.

    Kind regards,
    Sebastian
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Alexandre
    Alexandre avatar
    20 posts
    Member since:
    Apr 2014

    Posted 10 Jun 2014 in reply to Sebastian Link to this post

    Yes, I still get the same minification error with the latest SP version.I check with the browser tools and the is a file that fails to load sprite.png.

    The browser is looking for it under the server root
    http://localhost/Content/kendo/2014.1.528/Metro/sprite.png
    while it should be looking under the website
    http://localhost/WebApplication1/Content/kendo/2014.1.528/Metro/sprite.png
  8. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 12 Jun 2014 Link to this post

    Thank you for these details, Alexandre.

    I believe the explanation from this forum post will help you address the error accordingly. Let me know whether everything is OK after applying the needed changes.

    Kind regards,
    Sebastian
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready