(originally from https://answers.atlassian.com/questions/152461/main-vmd-not-used-in-editor-when-crating-page-from-blueprint)

      The issue is that customers can use custom themes with layouts like:

      <layout key="main" name="Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator"
                  overrides="/decorators/main.vmd">
              <resource type="velocity" name="decorator"
                        location="com/atlassian/confluence/themes/foo/main.vmd"/>
      </layout>
      

      In the Confluence Create Content plugin (which implements Blueprints), to get the main decorator working we need a plugin decorator module:

      <decorator name="Main Decorator" page="decorators/main.vmd" key="main">
          <pattern>/plugins/createcontent/*</pattern>
      </decorator>
      

      These two decorator configurations don't appear to be playing friendly - the vmd override file from the layout is not being used, so everything gets the default theme's decorators/main.vmd file.

      One potential "fix" would be to drop the <decorator> module in favour of a Page decorator (see https://developer.atlassian.com/display/CONFDEV/Using+Standard+Page+Decorators), but this would require changes to all template files. It seems better to apply the correct decorator based on the URL pattern, as we are currently doing.

      The fix would involve ensuring that the Sitemesh decorator selector is calling the ConfluenceSpaceDecoratorMapper (which uses the theme override) after the PluginDecoratorMapper (which uses the decorator module).

          Form Name

            [CONFSERVER-28834] Blueprint Screens can't be decorated with custom Themes

            Atlassian Update - September 2019

            Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket.

            If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review.

            You can read more about the editor upgrade in the 6.14 Release Notes.

            Thanks

            Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            Makisa Appleton added a comment - Atlassian Update - September 2019 Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket. If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review. You can read more about the editor upgrade in the 6.14 Release Notes . Thanks Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            Did you change the order of the Decorator Mapper in the sitemesh.xml as I mentioned in the first comment?

            <decorator-mappers>
            <!-- 
            change order of PluginDecoratorMapper and ConfluenceSpaceDecoratorMapper to enable Theme overrides
            -->
            <mapper class="com.atlassian.confluence.setup.sitemesh.ConfluenceSpaceDecoratorMapper" />
            
            <mapper class="com.atlassian.confluence.setup.sitemesh.PluginDecoratorMapper" />
            ...

            Michael Ammann added a comment - Did you change the order of the Decorator Mapper in the sitemesh.xml as I mentioned in the first comment? <decorator-mappers> <!-- change order of PluginDecoratorMapper and ConfluenceSpaceDecoratorMapper to enable Theme overrides --> <mapper class= "com.atlassian.confluence.setup.sitemesh.ConfluenceSpaceDecoratorMapper" /> <mapper class= "com.atlassian.confluence.setup.sitemesh.PluginDecoratorMapper" /> ...

            Hi Michael

            I tried to use this defintion, may I missed something because it doesn't work in the teammeeting blueprint for example

                 <theme key="myTheme" name="Theme" >
                    <description>${project.description}</description>
                    <layout key="${atlassian.plugin.key}:guMain"/>
            <!-- I tried with and without this registration: -->
                    <layout key="${atlassian.plugin.key}:guMainAlias"/>
                     ...
                </theme>
            
            
                <layout key="guMain" name="*VMD* - Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator"
                        overrides="/decorators/main.vmd">
                    <resource type="velocity" name="decorator"
                              location="theme/main.vmd"/>
                </layout>
            
                <layout key="guMainAlias" name="VMD - Main Decorator Alias" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="decorators/main.vmd">
                    <resource type="velocity" name="decorator" location="theme/main.vmd"/>
                </layout>
            

            But this is the way I intended as a workaround right?
            Confluence 6.2

            Oliver Straesser added a comment - Hi Michael I tried to use this defintion, may I missed something because it doesn't work in the teammeeting blueprint for example <theme key= "myTheme" name= "Theme" > <description> ${project.description} </description> <layout key= "${atlassian.plugin.key}:guMain" /> <!-- I tried with and without this registration: --> <layout key= "${atlassian.plugin.key}:guMainAlias" /> ... </theme> <layout key= "guMain" name= "*VMD* - Main Decorator" class= "com.atlassian.confluence.themes.VelocityDecorator" overrides= "/decorators/main.vmd" > <resource type= "velocity" name= "decorator" location= "theme/main.vmd" /> </layout> <layout key= "guMainAlias" name= "VMD - Main Decorator Alias" class= "com.atlassian.confluence.themes.VelocityDecorator" overrides= "decorators/main.vmd" > <resource type= "velocity" name= "decorator" location= "theme/main.vmd" /> </layout> But this is the way I intended as a workaround right? Confluence 6.2

            Ah difference is the missing "/"

            Thank you for sharing this, I will test it for our theme too!

            Oliver Straesser added a comment - Ah difference is the missing "/" Thank you for sharing this, I will test it for our theme too!

            Michael Ammann added a comment - - edited

            use an additional layout
            <layout key="guMainAlias" name="VMD - Main Decorator Alias" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="decorators/main.vmd">
            <resource type="velocity" name="decorator" location="theme/decorators/main.vmd"/>
            </layout>
             The ConfluenceSpaceDecoratorMapper searches for matching paths to replace them with theme overrides. So you need the original and an additional layout override for the wrong definition in the confluence-create-content-plugin.

             

             

            Michael Ammann added a comment - - edited use an additional layout <layout key="guMainAlias" name=" VMD - Main Decorator Alias" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="decorators/main.vmd"> <resource type="velocity" name="decorator" location="theme/decorators/main.vmd"/> </layout>  The ConfluenceSpaceDecoratorMapper searches for matching paths to replace them with theme overrides. So you need the original and an additional layout override for the wrong definition in the confluence-create-content-plugin.    

            Hi Michael 

            I didn't get your approach for the layout module. For example we have a layout module overwriting the path:

            	<layout key="guMain" name="*VMD* - Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/main.vmd">
            		<resource type="velocity" name="decorator" location="theme/decorators/main.vmd"/>
            	</layout>
            

            Did I miss something from you idea?

            Thanks
            Oli

            Oliver Straesser added a comment - Hi Michael  I didn't get your approach for the layout module. For example we have a layout module overwriting the path: <layout key= "guMain" name= "*VMD* - Main Decorator" class= "com.atlassian.confluence.themes.VelocityDecorator" overrides= "/decorators/main.vmd" > <resource type= "velocity" name= "decorator" location= "theme/decorators/main.vmd" /> </layout> Did I miss something from you idea? Thanks Oli

            During upgrade to Confluence 6.2 i found following solution:

            You can change the order of the DecoratorMappers (put the PluginDecoratorMapper after the ConfluenceSpaceDecoratorMapper) and either change the decorator module in the confluence-create-content-plugin to use the correct path "/decorators/main.vmd" or add a layout module to your theme, which considers the wrong path "decorators/main.vmd".

            This could also be a solution in Confluence itself, because I found no reason, why plugin decorator modules should not be themed or overwritten by a global/space configuration

            Michael Ammann added a comment - During upgrade to Confluence 6.2 i found following solution: You can change the order of the DecoratorMappers (put the PluginDecoratorMapper after the ConfluenceSpaceDecoratorMapper) and either change the decorator module in the confluence-create-content-plugin to use the correct path "/decorators/main.vmd" or add a layout module to your theme, which considers the wrong path "decorators/main.vmd". This could also be a solution in Confluence itself, because I found no reason, why plugin decorator modules should not be themed or overwritten by a global/space configuration

            Why is priority low? You kill all Theme Plugin´s out there...

            Philipp Scherer added a comment - Why is priority low? You kill all Theme Plugin´s out there...

            Any plans to solve this issue since it's now over 3 years old?
            It's really ugly for all theme vendors.

            Thank you for a reply

            Communardo Switzerland AG added a comment - Any plans to solve this issue since it's now over 3 years old ? It's really ugly for all theme vendors. Thank you for a reply

            Any plans to fix this bug after > 2 years?

            For us it's a major one, as we have a corporate theme that visually differs vastly from the default theme. Users get really confused whenever they create content using blueprints.

            Bernd Lindner added a comment - Any plans to fix this bug after > 2 years? For us it's a major one, as we have a corporate theme that visually differs vastly from the default theme. Users get really confused whenever they create content using blueprints.

              Unassigned Unassigned
              dtaylor David Taylor (Inactive)
              Affected customers:
              11 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: