Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6821

Selectors are not cleared on FORWARD or INCLUDE

    Details

    • Type: Task
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: core
    • Labels:
      None
    • Sprint:
      Kromeriz 69
    • Story Points:
      3
    • Magnolia Release:
      5.5

      Description

      1. Request http://localhost:8080/magnoliaPublic/demo-project~mgnlArea=branding,metaNavigation~ sets selector to mgnlArea=branding,metaNavigation and also sets context attribute mgnlArea=branding,metaNavigation.
      2. A subsequent forward or include without a selector (http://localhost:8080/magnoliaPublic/demo-project/stage/component) does:
                if (StringUtils.isNotEmpty(selector)) {
                    selectors = this.selector.split(Path.SELECTOR_DELIMITER); //selectors are not assigned, it keeps mgnlArea=branding,metaNavigation 
                }
                for (String sel : selectors) {
                    ...
                    MgnlContext.setAttribute(splitSelector[0], splitSelector[1]); //mgnlArea=branding,metaNavigation is set incorrectly
                    ...
                }
        

        info.magnolia.cms.core.AggregationState#setSelector should not set the previously set selectors if the current selector is empty and could possible also clear the attributes set by the previous selector.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rkovarik Roman Kovařík
                Reporter:
                rkovarik Roman Kovařík
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: