Umbraco-CMS icon indicating copy to clipboard operation
Umbraco-CMS copied to clipboard

RTE macro being stripped out

Open shearer3000 opened this issue 11 months ago • 4 comments

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

Observed in Umbraco 13 including 13.1.1, 13.2.0

Bug summary

When adding a macro into the RTE and performing a save+publish on the page, the macro will seemingly disappear immediately from the WYSIWYG editor

image

Specifics

No response

Steps to reproduce

Investigating further, when adding the macro and inspecting the markup in chrome dev tools reveals the following markup (note the macro div within the p tag):

image

but if i click the 'view source code', then the markup is sansitised/reformatted (note not sitting within p the any longer)

image

Expected result / actual result

Expected results: inserting an RTE macro produces markup that will save and publish correctly Actual results: macro removed during save (unless 'viewing source' beforehand)

Is this already tracked as a known issue? I scanned the tracker but couldn't find an obvious one.

How can this be resolved?

shearer3000 avatar Mar 19 '24 01:03 shearer3000

Hi there @shearer3000!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

github-actions[bot] avatar Mar 19 '24 01:03 github-actions[bot]

Hey! Thanks a lot for reporting this issue, I was unable to reproduce this on version 13.2.1. I tried reproducing the issue using the Login and Login status snippets for partial view macro files. afterwards, I inserted both Macros in a RTE. image I was also able to render it: image

Can you please provide the exact steps of how you encountered this issue from a clean install of Umbraco? 😄

andr317c avatar Mar 19 '24 13:03 andr317c

Hi @andr317c

Here is one way to replicate this issue, but we have seen this happen with pages that were not freshly created.

https://github.com/umbraco/Umbraco-CMS/assets/1691300/26e6ab8a-07d0-429d-ba0d-c6d26a1b9202


FYI

  • If after adding the macro, I click into the RTE area, this bug does not occur.
  • If I do not add the text before the macro, this bug does not occur.

oliemason avatar Mar 20 '24 20:03 oliemason

hi @andr317c were you able to replicate the issue using the video demo above?

shearer3000 avatar Apr 08 '24 03:04 shearer3000

Hi Umbraco team @andr317c - can we expect any updates for this one in Umbraco 13?

shearer3000 avatar Jul 18 '24 03:07 shearer3000

https://github.com/umbraco/Umbraco-CMS/pull/17008 Maybe this is related?

nzdev avatar Sep 05 '24 05:09 nzdev