Issue
-
We are trying to create sites from a site template that is
-
- generated from a custom theme
-
this custom theme contains the resource
WEB-INF/classes/resource-importer/
in the theme's war file - there are no custom configurations provided to the resource importer, it only contains the default empty sitemap.json
-
- When we stop the server, clear the following folders:
- osgi/state
-
work
-
tomcat-[version]/temp
-
tomcat-[version]/work
- Then restart the server, the custom themes are no longer set for certain sites, they use the default theme.
- How can we fix this?
Environment
- DXP 7.2
Resolution
- With your configuration, the automatically created site template is not configured beyond the default settings, so it uses the classic theme.
- At every portal startup, the site is propagated from the site template, so the classic theme is applied to all the sites created from this site template. This overrides the custom theme on the sites themselves.
There are a couple of solutions the you could apply to resolve the situation:
Solution A)
Steps to follow
- Create a page on the Custom Theme Site Template.
- Still on the Custom Theme Site Template, go to Site Builder > Pages > Configure
> Look and Feel and change the theme to the custom theme.
- Optional: delete the created page if it's not needed, the theme setting will stay in place regardless.
Solution B)
If you don't plan to add any configuration/content on the custom Site Template that needs to be propagated on the child sites, you can disable the propagation on the child sites at
- Go to Site Menu > Configuration > Site Settings > General tab > Pages
- Set the Enable propagation of changes from the site template custom theme. setting to No
- Save
And the theme should not be overridden at startup.