Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-788

Ugly freemarker exception when no theme is selected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • 1.4.x
    • 1.4.4
    • None
    • None

      If I create a page in a project that has STK (not sure if ETK would make a difference), and no theme is present or configured, I get an ugly FreeMarker error:

      freemarker.template.TemplateModelException: get(cssFiles) failed on instance of info.magnolia.module.templatingkit.style.ThemeReference
      	at freemarker.ext.beans.BeanModel.get(BeanModel.java:223)
      	at freemarker.core.Dot._getAsTemplateModel(Dot.java:76)
      <...>
      
      Caused by: java.lang.NullPointerException
      	at info.magnolia.module.templatingkit.style.ThemeReference.getCssFiles(ThemeReference.java:81)
      	... 115 more
      

      We should handle this more gracefully, possibly with a NullTheme implementation.

      Edit: furthermore, I now notice that the site in STK is configured to use theme pop by default, whether that theme is there or not.

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: