Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6624

RTE image selector embeds context

XMLWordPrintable

    • Yes
    • UI FW 38, UI FW 39
    • 3

      Reproduce

      • Download a tomcat bundle to have both magnoliaAuthor and magnoliaPublic running in context.
      • Enable the "images" button on the mtk:components/textImage
      • Create a page with the basic page template and add a text image component.
      • Use the images button to embed an image in the RTE
      • Notice the embedded image link has "magnoliaAuthor"

      Publish the page
      On public when requesting the page is:

      <div class="text-section">
              <p><img alt="" src="/magnoliaAuthor/dam/jcr:795449d2-6c16-402e-9e8a-bbb101fe22bb/shark_brian_warrick_0824.JPG" style="height:866px; width:1197px" /></p>
      </div><!-- end text-section -->
      

      Expected
      A better way to handle the context without embedding it into the content.

      Actual
      The context becomes part of the link.

      Dev notes
      Caused by https://git.magnolia-cms.com/projects/MODULES/repos/dam/browse/magnolia-dam-jcr/src/main/java/info/magnolia/dam/jcr/JcrAssetProvider.java#410 prepending asset link with context
      The latter is used at https://git.magnolia-cms.com/projects/MODULES/repos/dam/browse/magnolia-dam-app/src/main/java/info/magnolia/dam/app/field/factory/DamRichTextFieldFactory.java#127
      Slack discussion https://magnolia-cms.slack.com/archives/CC1GVEGFP/p1615905137003800?thread_ts=1612883302.050300&cid=CC1GVEGFP

      Workaround
      Use a regex redirect to modify the uri on public.

        Acceptance criteria

          1. textImage.png
            189 kB
            Richard Gange
          2. website.home.yaml
            2 kB
            Richard Gange

              asiska Adam Siska
              rgange Richard Gange
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD