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

ThemeInstallTask will never update a mobile theme configuration, missing boostratp task

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.0.10
    • 2.0
    • themepop
    • None

      The concept of the ThemeVersionHandler is to reinstall the whole theme on any update of the module.

      But the ThemeInstallTask just bootstraps the base theme configuration, but not a mobile theme.
      This didn't show up, because on module installation both configurations are bootstrapped by the BaseInstallTasks of the DefaultModuleVersionHandler (basicInstallTasks.add(new ModuleBootstrapTask()).

      But on update, only the 'base' theme (the one defined in the themes module descriptor) is re-bootstrapped:

      new BootstrapSingleResource("", "", "/mgnl-bootstrap/theme-" + themeName + "/config.modules.standard-templating-kit.config.themes." + themeName + ".xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING).execute(ctx);
      

      Solution:
      I think most proper solution would be defining two properties within the module descriptor, one for the base theme, and one for the mobile theme.

        <properties>
          <property>
              <name>themeName</name>
              <value>pop</value>
          </property>
          <property>
              <name>mobileThemeName</name>
              <value>pop-mobile</value>
          </property>
        </properties>
      

      Using an custom task which checks if the property 'mobileThemeName' is defined, and if so bootstraps it.
      (For the case you're not using a mobile theme)

        Acceptance criteria

              ochytil Ondrej Chytil
              cringele Christian Ringele
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: