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

Selectors are not cleared on FORWARD or INCLUDE

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Neutral
    • 5.5
    • None
    • core
    • None
    • Kromeriz 69
    • 3

    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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoR