This project is read-only.

EBE: How to deploy a custom theme with a feature...?

Topics: Enhanced Blog Edition
Sep 25, 2008 at 10:51 AM
Edited Sep 25, 2008 at 10:55 AM

I got the following error, when I deployed my custom theme with a feature.

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Value cannot be null.
Parameter name: value

Source Error:

[No relevant source lines]

Source File: /My Blog/themes/MyTheme/theme.master    Line: 1 


A problem with the master page.
My elements file in my feature:

<Elements xmlns="">
  <Module Name="Files" Url="themes/e-office2" Path="files" RootWebOnly="False">
    <File Url="theme.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"></File>

After opening the theme.master in SharePointDesigner and saving it again, the masterpage works fine.
Opening the masterpage in SD makes it unghosted.

My conclusion:
It is not possible to deploy theme.master with a feature (elements>module>file) and have it ghosted.

Is my conclusion right?

Is it possible to depeloy the custom theme with a feature?

Sep 25, 2008 at 12:32 PM
Edited Sep 25, 2008 at 12:34 PM
the answer..

Include the CKS.EBE.ThemeFeatureReceiver in the feature, this eventhandler will deploy the master page.

<Feature  Id="5F633C35-2CFA-4be5-AE17-1BA2D6F6D145"
          Title="My Custom Theme"
          Description="My Custom Theme"
          ReceiverAssembly="CKS.EBE, Version=, Culture=neutral, PublicKeyToken=3e8b700c069fb747"
        <ElementManifest Location="elements.xml"/>

For an example see the CKS EBE Themes feature. Keep the same folder structure in the feature like  MyFeature/Themes/<MyTheme>/*.master

Oct 13, 2008 at 10:44 PM
Try editing the master page in SPD and saving it.