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

How can I continue to utilize legacy Telerik themes after upgrading?

1 Answer 69 Views
Theme Builder
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 13 Dec 2016, 07:56 PM

I have inherited a legacy ASP.NET project that uses Telerik controls. The first step was to upgrade 
the Telerik components, and I have upgraded them from quite old versions (don't recall the exact 
version numbers or dates) to 2016.1.412.35, which show up like so (Auto Update) in the project's 
property page (screen shot that demonstrates this uploaded).

I can run the site and try to log in, but then as the GUI is updated based on the login success and 
values, I get a Telerik exception regarding the inability to find an embedded skin ("Forest" in my 
case).

The markup that apparently is the culprit is:

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Direction="RightToLeft" 
MinDisplayTime="200" BorderStyle="none" BorderColor="Orange" BorderWidth="1px" InitialDelayTime="5" 
runat="server" Skin="Forest" EnableViewState="true" EnableSkinTransparency="true" 
EnableAjaxSkinRendering="true" />

(specifically the "Skin="Forest"" part).

In case it's of value, this is the full exception, as shown in the browser:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Error in '/' Application.

Telerik.Web.UI.RadAjaxLoadingPanel with ID='RadAjaxLoadingPanel1' was unable to find an embedded skin 
with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have 
added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a 
custom skin, set EnableEmbeddedSkins=false.

Description: An unhandled exception occurred during the execution of the current web request. Please 
review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Telerik.Web.UI.RadAjaxLoadingPanel with 
ID='RadAjaxLoadingPanel1' was unable to find an embedded skin with the name 'Forest'. Please, make 
sure that the skin name is spelled correctly and that you have added a reference to the 
Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set 
EnableEmbeddedSkins=false.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information 
regarding the origin and location of the exception can be identified using the exception stack trace 
below.

Stack Trace: 

[InvalidOperationException: Telerik.Web.UI.RadAjaxLoadingPanel with ID='RadAjaxLoadingPanel1' was 
unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is 
spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in 
your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.]
   Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType, 
Boolean designTime) +630
   Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType) 
+39
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl control) +373
   Telerik.Web.UI.RadAjaxLoadingPanel.RegisterCssReferences() +89
   Telerik.Web.UI.RadAjaxLoadingPanel.ControlPreRender() +128
   Telerik.Web.UI.RadAjaxLoadingPanel.OnPreRender(EventArgs e) +47
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean 
includeStagesAfterAsyncPoint) +842

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are many places in the code where "Forest" is explicitly referenced. Do I really need to remove 
all these? If so, what can I replace it with? Can I use the "Default" theme?

I wonder why (if it's really so) that upgrading Telerik versions make old skins invalid?

Can I salvage the existing GUI code? The project has an App_Themes folder which has, not only the 
"Forest" Theme, but many others:

(another screen shot uploaded that shows this).

I have a feeling if I really do need to eliminate the explicit references to "Forest", that will only 
be the tip of the iceberg, so to speak.

So my first preference would be to somehow still be able to reference these themes, and my second 
would be a quick way to prevent all these errors by perhaps using one theme for everything in some 
overriding global setting.

So how can I either continue to utilize legacy Telerik themes, or what is a relatively painlessly workaround 
for the litany of errors that are bound (no pun intended) to otherwise occur?

For a version of the question with inline screenshots, see http://stackoverflow.com/questions/41129149/how-can-i-continue-to-utilize-legacy-telerik-themes-after-upgrading

1 Answer, 1 is accepted

Sort by
0
Ivan Zhekov
Telerik team
answered on 19 Dec 2016, 07:22 AM
That's going to be a longer reply, so please bear with me.

Close to 4 years ago, we decided to drop 6 themes from our assembly for various reasons -- http://www.telerik.com/blogs/6-telerik-asp.net-ajax-skins-going-obsolete, with Forest being one of them. So that puts your code base at the minimum between 3 and 4 years back.

(Reading trough your SO post, I see that you found the blogpost yourself.)

Trying to reference a skin that is not in the assembly will result in the error you saw.

On the part for automatically fallbacking to default or another skin, that's not quite possible, since when embedded skin is missing, Forest per say, we can't know for sure if it's our own embedded that we've removed or it's a customers skin with the same name that's missing.

You could use RadSkinManager or web.config to set page wide or system wide skins.

You could also use ASP Themes to set common properties for a set of controls.

And finally, to answer the question in the title -- how can and can you utilize legacy themes -- you can't. We've made improvements over the existing controls that are not handled in legacy themes; bug fixes and new controls which are also not covered.

Regards,
Ivan Zhekov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Theme Builder
Asked by
Eric
Top achievements
Rank 1
Answers by
Ivan Zhekov
Telerik team
Share this question
or