Legacy Knowledge Base
Published Jun. 30, 2025

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

Written By

Rita Schaff

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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

Did this article resolve your issue ?

Legacy Knowledge Base