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

Telerik CDN always returns lightweight CSS

10 Answers 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
René
Top achievements
Rank 2
René asked on 09 Feb 2018, 03:28 PM

Hi,

we are using CDN to get Telerik scripts and styles. All is set in web.config:

<add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
<add key="Telerik.ScriptManager.TelerikCdn.CombinedResource" value="Enabled" />
<add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />
<add key="Telerik.StyleSheetManager.TelerikCdn.CombinedResource" value="Enabled" />

Now I found that some controls are broken. I tried to identify problem, so deactivated CDN. All works fine. Controls are ok.

So I disabled CombinedResources and found, that all CSS files are for lightweight rendering.

https://d35islomi5rx1v.cloudfront.net/ajaxz/2017.2.711/CombinedBaseSkinClassic.css

But we are using custom skins in Classic render mode. I tried to set it to web.config too, but it doesn't work:

<add key="Telerik.Web.UI.RenderMode" value="classic" />

 

So when CDN started to provide lightweight styles and how to get classic ones?

Regards

René

10 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Feb 2018, 02:48 PM

Hello René,

The RenderMode property of the RadStyleSheetManager controls which combined base stylesheet you get: https://docs.telerik.com/devtools/aspnet-ajax/controls/stylesheetmanager/cdn-support/combined-request-for-telerik-controls.

I am attaching two screenshots that illustrate this.

Since there are different ways to set the render mode, it is possible that your project has an appSettings switch that sets the RenderMode to Lightweight: https://docs.telerik.com/devtools/aspnet-ajax/controls/render-modes#setting-render-mode.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
René
Top achievements
Rank 2
answered on 12 Feb 2018, 02:57 PM

Hello,

no one of our control or anything is set to lightweight mode.

MasterPage contains definition of RadStyleSheetManager

        <telerik:RadStyleSheetManager runat="server" ID="rssm" EnableStyleSheetCombine="true"></telerik:RadStyleSheetManager>

And only other settings for style combiing etc is in web.config in appSettings as I wrote in 1st post, because we want to set it on all websites from 1 place. So no settings in code or markup.

Our skins are older than lightweight mode so we are not switching render mode to anything. So classic mode should be set by default, or not?

Regards

René

0
Marin Bratanov
Telerik team
answered on 12 Feb 2018, 03:06 PM

Hello René,

If nothing else changes it, Classic is the default mode.

I am attaching a screenshot of what is supposed to happen with those settings.

If this is not what you get, my best guess is that some code in the project changes the render mode of the style sheet manager. Nevertheless, you can try setting its RenderMode to Classic explicitly.

If this does not help, I will need you to open a ticket and send me an example that showcases the problem, as this would be something highly specific to the particular case.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
René
Top achievements
Rank 2
answered on 12 Feb 2018, 03:39 PM

Hello,

ok, I'll show you something strange :-)

I just ran our application in debug. No CDN and combing is enabled. No settings in web.config.     

Please check file calendar_01_no-cdn_axd.JPG. Calendar control is ok, axd is used to server css.

Now I set CDN and combining as I wrote in 1st post. So 4 items are enabled in web.config. Check screen calendar_02_with-cdn_combined.JPG. Control is broken. Combined CSS is loaded. Url is:

http://aspnet-skins.telerikstatic.com/ajaxz/2017.2.711/CombinedBaseSkinClassic.css

Ok, and then another attempt. I just disabled combining in web.config, but CDN is enabled. Please check screen calendar_03_with-cdn_not-combined.JPG. Well, control seems to be ok, but Lite css files are loaded. For example:

http://aspnet-skins.telerikstatic.com/ajaxz/2017.2.711/CalendarLite.css

So in this case just enabling script and style combining will break our website. Why? And why "Lite" styles are loaded, if there is no "lightweight" render mode is enabled?

 

Regards

René

0
Marin Bratanov
Telerik team
answered on 13 Feb 2018, 12:02 PM

Hello René,

This indicates that the page has the Lightweight RenderMode of the calendar on it. This setting can be in the web.config, in the control declaration, or in the code-behind.

When combining is enabled, you get the Classic styles because the RadStyleSheetManager's RenderMode determines that, and it defaults to Classic. If you set it to Lightweight, you will get the Lite skins.

<telerik:RadStyleSheetManager runat="server" ID="rssm" EnableStyleSheetCombine="true" RenderMode="Lightweight"></telerik:RadStyleSheetManager>


Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
René
Top achievements
Rank 2
answered on 13 Feb 2018, 12:13 PM

Hello,

now I understand. I found one user control with enabled Lightweight in ascx. It should be the problem.

Is there any way how to force Classic mode in web.config to overwrite all other settings? I need to switch to classic mode everywhere until out Lightweight skin is ready.

Regards

René

0
Marin Bratanov
Telerik team
answered on 13 Feb 2018, 12:20 PM
0
René
Top achievements
Rank 2
answered on 13 Feb 2018, 12:23 PM

Well but I tried this one:

<add key="Telerik.Web.UI.RenderMode" value="classic" />

and it seems that it doesn't work.

I need to set classic mode in web.config.

0
René
Top achievements
Rank 2
answered on 13 Feb 2018, 12:24 PM

Well but I tried this one:

<add key="Telerik.Web.UI.RenderMode" value="classic" />

and it seems that it doesn't work.

I need to set classic mode in web.config.

0
Marin Bratanov
Telerik team
answered on 15 Feb 2018, 03:50 PM

Hello,

I am attaching here a short video that demonstrates the expected behavior.

If this does not work for you like that, there must be other code overriding the RenderMode of the stylesheet manager to lightweight.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
René
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
René
Top achievements
Rank 2
Share this question
or