Documentation Home

2.1 to 2.3.0-GA Migration

Parent Theme Hierarchy

One of the largest changes for this release was the addition of a Theme Hierarchy. This functionality
is described in more detail within the linked document, but it essentially allows inheritance between theme configurations.

The most relevant change that needs to be made if upgrading from 2.1 to 2.3.0-GA is adding the PARENT_THEME_ID column
to the BLC_THEME_CONFIGURATION. In addition, we corrected a typo in the themeDescription column for ThemeDefinition.

ALTER TABLE BLC_THEME_DEFINITION CHANGE COLUMN THEME_DESCRIPITON THEME_DESCRIPTION VARCHAR(255) DEFAULT NULL;

ALTER TABLE BLC_THEME_CONFIGURATION ADD PARENT_THEME_ID BIGINT DEFAULT NULL;

ALTER TABLE BLC_THEME_CONFIGURATION ADD CONSTRAINT FKE38EF8BADBD01278 FOREIGN KEY (PARENT_THEME_ID) REFERENCES BLC_THEME_CONFIGURATION (THEME_CONFIGURATION_ID);

Note: The above script is for MySQL, different databases may have different methods of altering tables and columns

In addition to this, it is also necessary to add in the ThemeParentTemplateResolver to your frontend/servlet configuration:

@Bean
public ThemeParentTemplateResolver blThemeParentTemplateResolver() {
    ThemeParentTemplateResolver templateResolver = new ThemeParentTemplateResolver();
    templateResolver.setPrefix("classpath:themes/");
    templateResolver.setSuffix(".html");
    templateResolver.setTemplateFolder(templateFolder);
    templateResolver.setTemplateMode(BroadleafTemplateMode.HTML5);
    templateResolver.setCacheable(cacheTemplate);
    templateResolver.setCacheTTLMs(cacheTTL);
    templateResolver.setOrder(275);
    return templateResolver;
}

Removal of Deprecated Methods

Deprecated methods that were originally deprecated, were now removed:

  1. com.broadleafcommerce.theme.service.ThemeFileService.getFileSystemPath