enonic/app-contentstudio

Caption text remains visible in html-area after archiving its image

Closed this issue · 3 comments

  1. Open a content with Html-area or a site with text component

  2. Open Insert Image dialog , select Decorative image radio button

  3. Fill in the caption input , click on Insert/Update button
    image

  4. Go to Browse panel and archve the image (click on Ignore inbound references)

  5. Switch to the content wizard then refresh it in browser or reopen the content.

BUG: Caption text is displayed in the html-area

image

Why is this a bug? Caption is stored in this content, not in the archived one. So there's no reason to why it should be hidden if the image is archived. We should fix this bug to show some kind of placeholder for an image that is no longer accessible, but caption doesn't have anything to do with that.

I guess there are two approaches when considering this in the front-end, and we should conclude what is the right approach - as some of this may occur within the API

a) The whole figure element is removed when image is missing
b) Front-end (or backend?) uses a nice fallback image if image is missing

a) We cannot modify the original content if an image is gone missing, in any case. And we won't have any magic that "hides" the figure element inside the editor if the image is not available.
b) This is another bug registered here: #7559.