(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).

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

            Makisa Appleton made changes -
            Resolution New: Obsolete [ 11 ]
            Status Original: Gathering Impact [ 12072 ] New: Closed [ 6 ]

            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
            Makisa Appleton made changes -
            Fix Version/s New: 6.14.0 [ 83892 ]
            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2901735 ] New: CONFSERVER Bug Workflow v4 [ 2996317 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2798238 ] New: JAC Bug Workflow v3 [ 2901735 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2728701 ] New: JAC Bug Workflow v2 [ 2798238 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2393798 ] New: JAC Bug Workflow [ 2728701 ]
            Status Original: Open [ 1 ] New: Gathering Impact [ 12072 ]

            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

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

                Created:
                Updated:
                Resolved: