Uploaded image for project: 'Magnolia Multisite Module'
  1. Magnolia Multisite Module
  2. MULTISITE-166

NotEmptyUriPrefixMatcher only matches Uri-Prefix with incorrect "startWith"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • High
    • None
    • 2.1.2
    • None

    Description

      Steps to reproduce

      1. Go to Demo Author https://demoauthor.magnolia-cms.com/.magnolia/admincentral
      2. Duplicate Site "travel" and rename duplication to "travel-destination"
      3. Change Theme to "sportstation-theme" in Site "travel-destination"
      4. Change Mapping URI Prefix to "/dest" and handlePrefix to "/travel/destination"  in Site "travel-destination"

      Expected results

      https://travel-demo.magnolia-cms.com/dest shows Destination-Page with Sportstation Header

      https://travel-demo.magnolia-cms.com/destination shows Destination-Page with Travel Header

      Actual results

      https://travel-demo.magnolia-cms.com/dest shows Destination-Page with Sportstation Header

      https://travel-demo.magnolia-cms.com/destination shows Error

      Workaround

      -

      Development notes

      info.magnolia.multisite.sites.matchers.NotEmptyUriPrefixMatcher matches UriPrefix in multiple places with startWith

      It should match either if uri is only uriPrefix itself or uri starts with uriPrefix as path, e.g. in described example it should only match if uri is "/dest" or "/dest/" only or starts with "/dest/" with further path

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              smohr Sebastian Mohr
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD