minified CSS files with IE8

8 posts, 1 answers
  1. Prashant
    Prashant avatar
    3 posts
    Member since:
    Sep 2012

    Posted 05 Jun 2015 Link to this post

    when using  

    <script src="~/Scripts/kendo/kendo.all.min.js" type="text/javascript"></script>
        <script src="~/Scripts/kendo/kendo.aspnetmvc.min.js" type="text/javascript"></script>

    we get the below mentioned exception: 

     Illegal characters in path.
      ~/Content/kendo/fonts/DejaVu/DejaVuSans-Bold.ttf) format("truetype"

    System.ArgumentException was unhandled by user code
      HResult=-2147024809
      Message=Illegal characters in path.
      Source=mscorlib
      StackTrace:
           at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
           at System.IO.Path.Combine(String path1, String path2)
           at System.Web.Configuration.UserMapPath.GetPhysicalPathForPath(String path, VirtualDirectoryMapping mapping)
           at System.Web.Configuration.UserMapPath.GetPathConfigFilename(String siteID, VirtualPath path, String& directory, String& baseName)
           at System.Web.Configuration.UserMapPath.MapPath(String siteID, String path)
           at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
           at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath, Boolean permitNull)
           at System.Web.CachedPathData.GetPhysicalPath(VirtualPath virtualPath)
           at System.Web.CachedPathData.GetConfigPathData(String configPath)
           at System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp)
           at System.Web.HttpContext.GetFilePathData()
           at System.Web.HttpContext.GetConfigurationPathData()
           at System.Web.Configuration.RuntimeConfig.GetConfig(HttpContext context)
           at System.Web.Configuration.HttpCapabilitiesBase.GetBrowserCapabilities(HttpRequest request)
           at System.Web.HttpRequest.get_Browser()
           at System.Web.HttpResponse.ApplyRedirectQueryStringIfRequired(String url)
           at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)
           at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
           at FastStart.Web.Global.Application_Error(Object sender, EventArgs e) in C:\svn\newrxrequest\FastStart\Refactor\branches\20151018\FastStart.Web\Global.asax.cs:line 105
           at System.EventHandler.Invoke(Object sender, EventArgs e)
           at System.Web.HttpApplication.RaiseOnError()
      InnerException: 

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 09 Jun 2015 Link to this post

    Hello Prashant,

    It looks like the server-side minifier is unable to handle @font-face declarations. Try replacing the quotation marks with apostrophes in the relevant CSS code, or do not minify the CSS files at all. If you are using our *.min.css files, they are already minified.

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Prashant
    Prashant avatar
    3 posts
    Member since:
    Sep 2012

    Posted 09 Jun 2015 in reply to Dimo Link to this post

    I am using the css minified files which comes with telerik demo, I don't have non minified css files.

    So can we fix the css minified files which comes with telerik demo ?

    Or is there a place from where I can download non minified css files ?

  5. Answer
    Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 11 Jun 2015 Link to this post

    Hello Prashant,

    Non-minified files are provided to clients with a commercial license.

    You can edit the minified files too, however, I am still not sure why exactly this problem occurs - we have not received any other reports for it from other people. My advice for a fast resolution is to either skip minification and bundling for the Kendo UI stylesheets, or use the CSS files from our CDN.

    http://docs.telerik.com/kendo-ui/install/cdn

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Prashant
    Prashant avatar
    3 posts
    Member since:
    Sep 2012

    Posted 11 Jun 2015 in reply to Dimo Link to this post

    Thanks, using the minified css files from the below mentioned CDN works....but the minified css files provided with "UI for ASP.NET MVC Q1 2015"  trial does not work.

     Whats the CDN for minified css files for ASP.NET MVC Q1 2015 verion ?

    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.318/styles/kendo.common.min.css" />
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.318/styles/kendo.default.min.css" />

  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 15 Jun 2015 Link to this post

    Hi Prashant,

    The version number for Q1 2015 is 2015.1.318. The version number for each Kendo UI distribution is included in the installer's file name.

    Generally, CDN URLs can be inferred from the documentation page linked above. Let us know if the guidelines there are confusing, so that we improve them.

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Emlyn
    Emlyn avatar
    1 posts
    Member since:
    Apr 2013

    Posted 29 Sep 2015 Link to this post

    Hi,

    I've come across the same problem in the professional version.

    In my case I was using the CssRewriteUrlTransformin my bundles ie.

    bundles.Add(new StyleBundle("~/Bundles/Content/Main/")
        //Kendo Styles
        .Include("~/Content/kendo/2015.2.902/kendo.common.min.css", new CssRewriteUrlTransform())
        .Include("~/Content/kendo/2015.2.902/kendo.dataviz.min.css", new CssRewriteUrlTransform())
        .Include("~/Content/kendo/2015.2.902/kendo.default.min.css", new CssRewriteUrlTransform())
        .Include("~/Content/kendo/2015.2.902/kendo.dataviz.default.min.css", new CssRewriteUrlTransform())
    );

    I found that the CssRewriteUrlTransform is dropping the surrounding quotes when it re-writes the urls.

    This line is the problem (note how it locates the quotes in the search string but doesn't put them back on the return).

    return new Regex("url\\(['\"]?(?<url>[^)]+?)['\"]?\\)").Replace(content,(MatchEvaluator)(match => "url("+CssRewriteUrlTransformWrapper.RebaseUrlToAbsolute(baseUrl, match.Groups["url"].Value) + ")"));​

     I fixed this by providing a replacement url transformer

    public class CssRewriteUrlTransformWrapper : IItemTransform
    {
        internal static string RebaseUrlToAbsolute(string baseUrl, string url)
        {
            if (string.IsNullOrWhiteSpace(url) || string.IsNullOrWhiteSpace(baseUrl) ||
                url.StartsWith("/", StringComparison.OrdinalIgnoreCase))
                return url;
            if (!baseUrl.EndsWith("/", StringComparison.OrdinalIgnoreCase))
                baseUrl += "/";
            return VirtualPathUtility.ToAbsolute(baseUrl + url);
        }
     
        internal static string ConvertUrlsToAbsolute(string baseUrl, string content)
        {
            if (string.IsNullOrWhiteSpace(content))
                return content;
            return new Regex("url\\(['\"]?(?<url>[^)]+?)['\"]?\\)").Replace(content,
                (MatchEvaluator)
                    (match => "url(\"" + CssRewriteUrlTransformWrapper.RebaseUrlToAbsolute(baseUrl, match.Groups["url"].Value) + "\")"));
        }
     
        public string Process(string includedVirtualPath, string input)
        {
            if (includedVirtualPath == null)
                throw new ArgumentNullException("includedVirtualPath");
            return
                CssRewriteUrlTransformWrapper.ConvertUrlsToAbsolute(
                    VirtualPathUtility.GetDirectory(includedVirtualPath.Substring(1)), input);
        }
    }

     

     

     

  9. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 30 Sep 2015 Link to this post

    Hello Emlyn,

    Thank you for your contribution and provided insights.

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready