Unlink not working
Description
When I unlink and reload the page, the text is still linked.
Steps to reproduce
- Enter some Text in a redactor field
- Place a link
- Save the page
- Unlink (do nothing else, this is important)
- 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):
- Enter some Text in a redactor field
- Place a link
- Save the page
- Unlink
- Change some text (like adding a word)
- 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
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.
Hello @mmikkel,
thank you for your reply! This sounds plausible.
Do you plan to fix this in the future?
Greetings from cologne 👋
@mmikkel Any updated plans on this issue? Our client would love to have this fixed soon 🥰
Greetings from cologne 👋
@fvwanja I wouldn't know; I'm not a Pixel & Tonic employee :)
Yes @mmikkel, sorry my bad!
@brandonkelly how about you 😅 Could you cramp this into the todo-list of the redactor development?
would be awesome if this bug could be fixed! @brandonkelly
Where seeing the same problem. :-)