magnolia

Site Module 1.3.1 breaks STK compatibility


I'm working in a magnolia project that I am trying to move from 5.7 to 6.2. It uses the old STK templating and we would like to keep it as the effort moving to MTK could be really big.

When moving from magnolia 6.1.5 to 6.1.6 our templates are not showing anymore. I have noticed that the site module was updated from 1.2.4 to 1.3.1. In there some legacy methods related to themes where removed. See this commit

This change brakes the STK for working to some extend as in STKTemplatingFunctions.java they are used.

// TODO dlipp/had: is that a good place to keep that code - you might have
// to access it from non-template related code. Maybe we shouldn't
// completely drop STKUtil but
// keep it for common stuff.
public Theme theme(Site site) {
    final String theme = site.getTheme().getName();
    return StringUtils.isBlank(theme) ? new ThemeImpl(new STKImagingSupport()) : (Theme) moduleProvider.get().getTheme(theme);
}

public info.magnolia.module.site.theme.Theme theme(info.magnolia.module.site.Site site) {
    final String theme = site.getTheme().getName();
    return StringUtils.isBlank(theme) ? new ConfiguredTheme(null) : moduleProvider.get().getTheme(theme);
}

Basically, moduleProvider.get().getTheme(theme) does not exist anymore.

I cannot find anything in the documentations that provides a workaround. Also I don't see any advice saying that the STK would not be usable anymore from some 6.X version.

I have found that the imaging modules was also affected by this change here

Has anyone faced also this issue? is there a workaround?


Solution

  • I have asked magnolia directly and they confirm that STK is not expected to work in version 6.

    https://jira.magnolia-cms.com/browse/SUPPORT-16220

    The documentation is a bit confusing and for some reason they do not clearly say from which version STK won't work anymore.

    We were able to make it work up to version 6.1.8 but it is not worth to keep it working with workarounds as any magnolia or module update could brake it again.