[MGNLDAM-994] CLONE - RTE image selector embeds context Created: 11/Oct/21  Updated: 22/Oct/21  Resolved: 12/Oct/21

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0.10
Fix Version/s: 3.0.11

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Adam Siska
Resolution: Fixed Votes: 0
Labels: VN-Testing, ckeditor, cs-bk, maintenance, ui-team-support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File textImage.png     File website.home.yaml    
Issue Links:
Cloners
clones MGNLUI-6624 RTE image selector embeds context Closed
Problem/Incident
duplicate
duplicates MGNLUI-6412 Insert images option in RichText fiel... Closed
relation
is related to MGNLUI-6527 Image embedded with RTE in the old pa... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Sprint: UI FW 38, UI FW 39
Story Points: 0

 Description   

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.


Generated at Mon Feb 12 05:05:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.