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

minified CSS files with IE8

7 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prashant
Top achievements
Rank 1
Prashant asked on 05 Jun 2015, 04:46 PM

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: 

7 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Jun 2015, 02:16 PM
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
0
Prashant
Top achievements
Rank 1
answered on 09 Jun 2015, 04:58 PM

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 ?

0
Accepted
Dimo
Telerik team
answered on 11 Jun 2015, 11:00 AM
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
0
Prashant
Top achievements
Rank 1
answered on 11 Jun 2015, 08:28 PM

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" />

0
Dimo
Telerik team
answered on 15 Jun 2015, 01:04 PM
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
0
Emlyn
Top achievements
Rank 1
answered on 29 Sep 2015, 06:48 AM

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);
    }
}

 

 

 

0
Dimo
Telerik team
answered on 30 Sep 2015, 11:58 AM
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
Tags
General Discussions
Asked by
Prashant
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Prashant
Top achievements
Rank 1
Emlyn
Top achievements
Rank 1
Share this question
or