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.39k stars 2.65k forks source link

Blocks in RTE content doesn't gets updated when you use the clipboard to copy #16663

Closed jericyuen closed 1 week ago

jericyuen commented 1 month ago

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

13.3.2

Bug summary

We are using a Block List to allow us to add multiple modules in the content section which allows me to add a Text Block module (that uses RTE editor). Within that RTE we had enabled the Blocks in RTE as per below https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/rte-blocks

So we can add Blocks to allow us to add like features in the RTE which works perfectly fine.

We realised that when we use the clipboard button to duplicate a content image

So when we use the clipboard to copy the Module content. Any content from Block List added inside the RTE which has been copied, sort of doesn't gets updated. image

So for example, we copy Block A and then use the clipboard to create Block B image

we'll have two blocks now. And if we update the Rich Text Row content (which is a Block list added inside RTE) within Block A, and we leave Block B's Rich Text Row as it is. Umbraco will keep returning back the same Content of the Blocks in RTE for both Block A and Block B.

We've tried to change the content of Rich Text Row in Block B but it never gets updated in the front end at all

Specifics

Tested in chrome browser and edge browser and it's the same

Steps to reproduce

Install a vanilla umbraco 13.3.2, I've then installed Paul Seal's Clean starter kit just so we have some dummy contents and dummy block list https://our.umbraco.com/packages/starter-kits/clean-starter-kit/

Go into Settings > Data Type > Richtext Editor > Enable Block from the settings image

Scroll down further and we add 'Rich Text Row' as the available Blocks image

Go back to the Content section. I've used the Features page. In the Content Rows properties, I've removed all the modules and leave just one remaining Rich text row module image

We then click on the module, click on the Block Icon to add a Rich text row at the bottom of the module image

You can add some dummy text in it image

Go to your VS Solution and add the richTextRow.cshtml inside the Views/Partials/richtext/components/ folder image

The code inside the richTextRow.cshtml will be as below

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.RichTextBlockItem>

@Model.Content.Value("content")

Now go back to the Content Section. Click on to duplicate the Rich Text Row module image

Now you will have two blocks image

Load the front end of the page, which you'll see it's rendered out with the inner RTE module too image

Now go back to Content Section and on the first RTE module. And amend the Rich Text Row inside the RTE image

You can leave the second RTE module as it is. Save and publish

And now view the Front End of the site

You can see that the bug is there showing both module content inside Blocks in Rich Text as below which is wrong image

Expected result / actual result

Expected results should be. Both Blocks in Rich Text should show different content cos they are both individual blocks. But Umbraco thinks it's the same when you use the Clipboard features


This item has been added to our backlog AB#42802

github-actions[bot] commented 1 month ago

Hi there @jericyuen!

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 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:

jericyuen commented 1 month ago

Any updates on this? thanks

NguyenThuyLan commented 1 month ago

Thank you @jericyuen for your very detailed issue description. I am reproducing your issue.

jericyuen commented 1 month ago

Just checking if there will be a fix soon on this šŸ™

jericyuen commented 1 month ago

Hi @NguyenThuyLan Just checking to see if there's any news on this? Thanks

jericyuen commented 3 weeks ago

Hi @NguyenThuyLan just checking on the update, as the client is chasing on this. It's been a month. Did you manage to figure things out? Thanks

NguyenThuyLan commented 2 weeks ago

Hi @jericyuen , sorry for the late response, I have informed the team about this issue. šŸ˜„, I will let you know soon

jericyuen commented 2 weeks ago

thank you @NguyenThuyLan

leekelleher commented 1 week ago

Fixed in #16866 for v13.5.0.