+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Unhandled Exception after themes removed

Unhandled Exception after themes removed

3 posts, 0 answered
  1. Sheridan
    Sheridan avatar
    13 posts
    Registered:
    02 Jul 2008
    06 Aug 2008
    Link to this post
    I removed all of the default themes.  Now when I make a new page, and I get to the screen that says "Now select a template" I get an unhandled exception if I choose the template before selecting my theme.

    Selecting my theme before selecting the template seems to be a workaround, but I don't feel I should have to include instructions to avoid an unhandled exception when this is deployed to a client.  I've searched through the entire solution for somewhere that is setting a default theme, but so far haven't found it.  Any help would be appreciated.  I have pasted the contents of the exception page below.


    Server Error in '/SiteFinity' Application.
    Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.
    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.Web.HttpException: Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.

    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:

    [HttpException (0x80004005): Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.]
       System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(String themeName) +1026
       System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(HttpContext context, String themeName) +68
       System.Web.UI.Page.InitializeThemes() +2074091
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +674


    Server Error in '/SiteFinity' Application.
    Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.
    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.Web.HttpException: Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.

    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:

    [HttpException (0x80004005): Theme 'Blue with right sidebar' cannot be found in the application or global theme directories.]
       System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(String themeName) +1026
       System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(HttpContext context, String themeName) +68
       System.Web.UI.Page.InitializeThemes() +2074091
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +674

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    06 Aug 2008
    Link to this post
    check to see if the template itself has a theme assigned to it. Next to a the SiteMap button in the Pages section of Sitefinity Admin is a Templates link. Go into that and see if you can change the theme. if it doesn't let you, create a temporary folder named 'Blue with right sidebar' in the App_Themes folder, then go into the template editor, and assign it either a different theme or remove the theme altogether, then you can delete the temp folder.

    hope that is helpful!
  3. Sheridan
    Sheridan avatar
    13 posts
    Registered:
    02 Jul 2008
    06 Aug 2008
    Link to this post
    It listed [No Theme] in the theme column.  I finally fixed the problem using the following steps.

    1) copy Default.master to another folder
    2) Delete the Template by clicking on the trash can on its row on the Template page in Sitefinity Admin
    3) Click Upload Master Page and use the copy of the file made in step one
    4) Re-associate each page that was using that template to the template.

    Now all of the pages are working, and a new page does not throw an exception.  I know this is probably not the best fix, but I am working on a deadline.
Register for webinar
3 posts, 0 answered