redactor icon indicating copy to clipboard operation
redactor copied to clipboard

Unlink not working

Open fvwanja opened this issue 3 years ago • 7 comments

Description

When I unlink and reload the page, the text is still linked.

Steps to reproduce

  1. Enter some Text in a redactor field
  2. Place a link
  3. Save the page
  4. Unlink (do nothing else, this is important)
  5. Save the page

→ The link is still there 👎

What does work is when I change some text after unlinking a hyperlink (see step 5 in the following list):

  1. Enter some Text in a redactor field
  2. Place a link
  3. Save the page
  4. Unlink
  5. Change some text (like adding a word)
  6. Save the page

→ The link is gone 👍

You may also check this handy video I took:

https://user-images.githubusercontent.com/90781427/180023403-a0b476af-a255-4012-9d37-187bf45045db.mp4

Additional info

  • Craft version: 3.7.36
  • PHP version: MAMP running on 8.0.8 (composer is locked to PHP version 7.2.5)
  • Database driver & version: –
  • Plugins & versions:
"craftcms/redactor": "2.10.10",
"utakka/redactor-anchors": "1.4.0",

*Yeah I know I use both craftcms/redactor and utakka/redactor-anchors and I do not know which one is the trouble maker so I will create a separate bug-ticket in https://github.com/heidkaemper/craft-redactor-anchors/issues/9. I promise to close the issue myself as soon as a solution has been found! 🙏 I just cannot figure out which plugin is responsible for this behaviour.

Thank you in advance, I ❤️ Craft

fvwanja avatar Jul 20 '22 15:07 fvwanja

I'm not using the Redactor Anchors plugin, so this is definitely an issue w/ Redactor itself.

Seems like the issue is that Craft doesn't create a new provisional draft (or re-save the existing provisional draft) when a link is unlinked in Redactor (possibly Redactor doesn't emit a "change" event or the like, for this action?).

If you make some other edit to the entry after unlinking (for example, by inserting a space in the Redactor field), and then save (i.e. apply the provisional draft), it works.

mmikkel avatar Aug 19 '22 12:08 mmikkel

Hello @mmikkel,

thank you for your reply! This sounds plausible.

Do you plan to fix this in the future?

Greetings from cologne 👋

fvwanja avatar Aug 24 '22 11:08 fvwanja

@mmikkel Any updated plans on this issue? Our client would love to have this fixed soon 🥰

Greetings from cologne 👋

fvwanja avatar Sep 16 '22 08:09 fvwanja

@fvwanja I wouldn't know; I'm not a Pixel & Tonic employee :)

mmikkel avatar Sep 16 '22 08:09 mmikkel

Yes @mmikkel, sorry my bad!

@brandonkelly how about you 😅 Could you cramp this into the todo-list of the redactor development?

fvwanja avatar Sep 16 '22 08:09 fvwanja

would be awesome if this bug could be fixed! @brandonkelly

NickLanger1990 avatar Oct 04 '22 11:10 NickLanger1990

Where seeing the same problem. :-)

green17 avatar Nov 04 '22 09:11 green17