[MGNLUI-6412] Insert images option in RichText field does not work after published Created: 18/Nov/20  Updated: 11/Oct/21  Resolved: 06/Sep/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
duplicate
is duplicated by MGNLDAM-994 CLONE - RTE image selector embeds con... Closed
is duplicated by MGNLUI-6624 RTE image selector embeds context Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce

1. In Resource Files App override this textField in travel-demo\dialog\component\textImage.yaml

  • name: text
    class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
    i18n: true
    images: true

2. Create a page with travel standard template and add a TextImage component
3. In RichText field add a "image" and add the same dam from "link to DAM document"
4. In image tab select a "Image"

5. publish page and preview in author instance

6. preview in public instance**

 

 


If you see source code author

      richtextcode image
<img alt="" src="/magnoliaAuthor/dam/jcr:be6a8109-dea0-40b9-ae5f-ec7a93dc083f/237-536x354.jpg" style="height:354px; width:536px">

      richtextcode link
<a href="/magnoliaAuthor/dam/jcr:be6a8109-dea0-40b9-ae5f-ec7a93dc083f/237-536x354.jpg">237-536x354.jpg</a>

      image

<img data-sizes="auto" class="content-image-below lazyautosizes lazyloaded" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="No alt text available for image" title="No alt text available for image" data-srcset="/magnoliaAuthor/.imaging/mte/travel-demo-theme/480/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 480w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/960/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 960w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/1366/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1366w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/1600/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1600w," sizes="940px" srcset="/magnoliaAuthor/.imaging/mte/travel-demo-theme/480/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 480w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/960/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 960w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/1366/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1366w,
/magnoliaAuthor/.imaging/mte/travel-demo-theme/1600/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1600w,">

If you see source code in public

            *richtextcode image (this image doens`t work)*

<img alt="" src="/magnoliaAuthor/dam/jcr:be6a8109-dea0-40b9-ae5f-ec7a93dc083f/237-536x354.jpg" style="height:354px; width:536px">

      richtextcode link
<a href="/magnoliaPublic/dam/jcr:be6a8109-dea0-40b9-ae5f-ec7a93dc083f/237-536x354.jpg">237-536x354.jpg</a>

      image
<img data-sizes="auto" class="content-image-below lazyautosizes lazyloaded" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="No alt text available for image" title="No alt text available for image" data-srcset="/magnoliaPublic/.imaging/mte/travel-demo-theme/480/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 480w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/960/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 960w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/1366/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1366w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/1600/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1600w," sizes="940px" srcset="/magnoliaPublic/.imaging/mte/travel-demo-theme/480/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 480w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/960/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 960w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/1366/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1366w,
/magnoliaPublic/.imaging/mte/travel-demo-theme/1600/dam/travel-demo/237-536x354.jpg/jcr:content/237-536x354.jpg 1600w,">

Expected results

  • Published image working

Actual results

  • Cannot access to image after publishing

Workaround

  • No

Development notes

  • Notes to developers:
    • The inserted image appeared as an absolute path to author instance with its context path. This failed to access from public instance due to security of author instance.


 Comments   
Comment by Johannes Kessler [ 03/Sep/21 ]

Hello everyone.

We experience the same problem. Adding a image with the image plugin does save the image path from the author and does not transform it into a public path while publish.

Any way or workaround to get this working again?

 

Edition Magnolia DX Core
Version (bundle) 6.2.11

Operating system Linux 5.4.17-2102.202.5.el7uek.x86_64 (amd64)
Java version Ubuntu 11.0.11 (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
Application server Apache Tomcat/9.0.38
Database MySQL 8.0.23-commercial
Java DB Driver MySQL Connector/J mysql-connector-java-8.0.22 (Revision: d64b664fa93e81296a377de031b8123a67e6def2)
Repository Jackrabbit 2.20.0

Generated at Mon Feb 12 09:36:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.