umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.4k stars 2.66k forks source link

Embed in Grid RTE removes embed after save / publish #11755

Open PBHansen opened 2 years ago

PBHansen commented 2 years ago

Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9

8.1.5

Bug summary

If I embed a video in a Grid RTE the video dissappears when I save / publish, unless I write something in the RTE field afterwards.

Could be related to: https://github.com/umbraco/Umbraco-CMS/issues/7461 ?

Specifics

No response

Steps to reproduce

Create Grid Insert Rich text editor Embed a video Save and publish

Expected result / actual result

I expected the embed video to stay after save and publish, however it dissappeared

simonech commented 2 years ago

If the embed is a script tag, I think it's removed automatically to prevent XSS injection.

PBHansen commented 2 years ago

If I type after inserting the embed video, it stays. I will see if I can get a git repo up later today with the exact bug

emma-hq commented 2 years ago

Hey @PBHansen

Thanks for the report - I'm going to see if this is actually expected behaviour for us and get back to you. Unless you'd like to update the issue to reflect the later behaviour you describe here as the issue? "If I type after inserting the embed video, it stays."

Emma

PBHansen commented 2 years ago

Hej @emma-hq

It feels like it's an "isDirty" property that is not getting set properly.

If I insert an embed video using: image and use a video link like this: https://vimeo.com/226053498 and press submit: image then I see the video in the RTE field, I then press Save and Publish: image then the video dissappears: image

However if I follow the same steps as above and type something after the embed video has been inserted: image and press save and publish, the video and text remains.

emma-hq commented 2 years ago

Heya @PBHansen

Thanks for the update! I'll take a look 👍

Emma

kjac commented 1 year ago

Hi @PBHansen,

Thank you for reporting this. Sorry things turned rather quiet here for a while.

I can reproduce this in V10 so it's definitively still an issue. Fortunately this only affects the grid RTE - it works fine in a regular RTE (as a stand-alone property editor).

The steps to reproduce remain the same:

  1. Embed something in any given RTE inside a grid.
  2. Do not make other changes to the RTE.
  3. Save the content.
  4. The embedded object is gone.

It certainly looks like a clientside issue where the grid RTE is not being marked as dirty and thus the grid doesn't pick up on the changes upon saving the content.

I'm going to mark this as up for grabs if anyone wants to have a try at fixing it 😄

github-actions[bot] commented 1 year ago

Hi @PBHansen,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)