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

Minification failed. Returning unminified contents.

6 Answers 727 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 09 Jun 2014, 12:49 PM
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?




6 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 09 Jun 2014, 03:38 PM
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.

 
0
Alexandre
Top achievements
Rank 1
answered on 09 Jun 2014, 03:49 PM
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.
0
Alexandre
Top achievements
Rank 1
answered on 09 Jun 2014, 04:43 PM
Hi,

I just upgrade to the latest service pack release (2014.1.528) and the problem still occur.
0
Sebastian
Telerik team
answered on 10 Jun 2014, 08:33 AM
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.

 
0
Alexandre
Top achievements
Rank 1
answered on 10 Jun 2014, 12:33 PM
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
0
Accepted
Sebastian
Telerik team
answered on 12 Jun 2014, 10:43 AM
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.

 
Tags
General Discussions
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Alexandre
Top achievements
Rank 1
Share this question
or