Custom theme is missing from some sites after a clean server start

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

  1. Create a page on the Custom Theme Site Template.
  2. Still on the Custom Theme Site Template, go to Site Builder > Pages > Configure cog.svg > Look and Feel and change the theme to the custom theme.
  3. 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 

  1. Go to Site Menu > Configuration > Site Settings > General tab > Pages
  2. Set the Enable propagation of changes from the site template custom theme. setting to No
  3. Save

And the theme should not be overridden at startup. 

Additional Information

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助