Uploaded image for project: 'Extended Templating Kit (closed)'
  1. Extended Templating Kit (closed)
  2. MGNLETK-57

ETKSiteManager in use with domain mappings: should return currentSite if no explicit repository mapping was detected.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.4.3
    • 1.4.2
    • multisite
    • None
    • Yes

      Situation:
      The STK homepage defines the logo and the print logo. In demo project they are chosen from DMS.
      When accessing the demo by the mapped domain name (http://demo-project-author.magnolia-cms.com/), the logo is not displayed anymore.
      The code starting point is the call getAssetLink(content, nodeDataPrefix, DAMSupport.VARIATION_ORIGINAL);
      So it will serve the image directly from DMS and not from the imaging repo/module.

      when looking at the rendered URL, it created an external link based on the defaultBaseURL, see print screen.

      Cause:
      1. No specific DMS mapping is defined for any site -> the ETKSiteManager falls back to default (instead of current)
      2. default site has no domain mapping -> fallback to the DomainNamePathTransformer which uses the defaultBaseURL

      Correction:
      When no explicit repository mapping in a siteDefinition can be detected, it means that the 'requested' content belongs to all. So the ETKSiteManager should return the current-site and not the default-site.
      (Included draft patch created together with Philipp)

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              cringele Christian Ringele
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: