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

Cannot Add Links to Tables in RTE in Distraction Free mode

Open Attackmonkey opened this issue 1 year ago • 10 comments

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

8.18.11

Bug summary

Using an RTE field, you can no longer add links into text contained in table cells. Links in normal text, e.g. paragraphs can still be linked as normal. This was working fine prior to the most recent update of the site to 8.18.11.

Specifics

This occurs in the back office, when adding links to text contained inside a table cell in an RTE field, and the RTE field is set to distraction free mode. Classic mode RTE fields work as expected.

Steps to reproduce

  1. Create an RTE field, allow tables and set it to distraction free mode.
  2. Add a table to the RTE field while editing a page
  3. Add some text to the table cells
  4. Select some of the text and click the link button
  5. Select a page to link to and click submit
  6. The text does not become a link

If you switch the field to Classic mode in settings and repeat the above steps, you'll be able to create a link as expected.

Expected result / actual result

I should be able to link text inside table cells inside the RTE.

Attackmonkey avatar Jan 02 '24 09:01 Attackmonkey

Hi there @Attackmonkey!

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 Jan 02 '24 09:01 github-actions[bot]

Hey Tim, I just checked whether it worked in 8.18.0 and it doesn't. What version was your instance at before you upgraded?

Migaroez avatar Jan 09 '24 14:01 Migaroez

Quite old, 8.5.3! Looks like it got broken at some point between then and more recent versions. I don't have any V8 sites on in between versions to check on sadly!

Attackmonkey avatar Jan 10 '24 09:01 Attackmonkey

Thanks Tim, that limits the search at least :)

Migaroez avatar Jan 10 '24 11:01 Migaroez

Hey Tim, I have been trying to find the version where this breaks so we can figure out what changed. I upgraded a project from 8.5.3 while jumping some versions all the way up to 8.18.12 and I never ran into the issue... Starting to think this might have something to do with one of the setting files as I have let the upgrade process overwrite every single one of them every time. I will try and find a proper answer when I have some more time.

Migaroez avatar Jan 31 '24 13:01 Migaroez

Could you do a div compare on /config/tinyMceConfig.config for following element?

<validElements>
        <![CDATA[+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],
-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],
img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],
-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],
-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],
-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],
-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],
dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],
param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*]]]>
    </validElements>

Migaroez avatar Jan 31 '24 14:01 Migaroez

Compare that against the version on our version that's broken?

Attackmonkey avatar Jan 31 '24 14:01 Attackmonkey

Our version is identical to that! As was the previous version of the site where it worked.

Attackmonkey avatar Jan 31 '24 14:01 Attackmonkey

Just had a go at it and I can reproduce 😁 The funny thing is it works fine when only selecting part of the text, but not all of it.

This is still a bug in v13, so It's apparently been there for a while 🙈 Marking it as up for grabs for now as we'd love some help with this 💪

Zeegaan avatar Feb 05 '24 11:02 Zeegaan

Hi @Attackmonkey,

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

github-actions[bot] avatar Feb 05 '24 11:02 github-actions[bot]