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

Details

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

    Description

      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)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: