Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlinking a link and then inserting it again removes other links #384

Closed
ai5679 opened this issue Mar 31, 2022 · 16 comments · Fixed by #388
Closed

Unlinking a link and then inserting it again removes other links #384

ai5679 opened this issue Mar 31, 2022 · 16 comments · Fixed by #388
Assignees
Labels

Comments

@ai5679
Copy link

ai5679 commented Mar 31, 2022

Description

Unlinking a link and then inserting it again removes other links in a paragraph.

Steps to reproduce

  1. Unlink a link
  2. Insert the link again
  3. The link earlier in the text disappears.

Screen recording of the issue: https://jmp.sh/9jOwd97

image

image

Additional info

  • Redactor version: 2.10.3
@ai5679 ai5679 added the bug label Mar 31, 2022
@umkasanki
Copy link

We have same issue

@corneliusio
Copy link

corneliusio commented Apr 1, 2022

Our team has also been experiencing this on a client site, but even without having first unlinked another link. From what I can tell these are the specific factors that seem to be at play.

  1. Only seems to occur when linking an entry, asset, or category. Inserting a custom URL does not appear to be causing this.
  2. If the text being link proceeds all other links in the field, the link is inserted as expected.
  3. If the first item is true and the text being linked follows any other links, the immediately preceding link is overwritten with both the URL and text being defined for the new link, leaving the original text intended to be linked unchanged.

There seems to be something occurring with the loss of focus on the input field when the Craft CMS modal for selecting entries opens, when the input is refocused after an entry is selected, the selection area of the text appears to jump to the preceding link and overwrite it instead of inserting the new anchor tag.

For us, this is occurring on [email protected] and [email protected] and the installation is using multi-site, on the off chance that's important.

@ahockemeyer
Copy link

We also are running into this on multiple sites. Ran all the updates and still having this issue. Please prioritize this, our clients need to edit content.

@bengreenbank
Copy link

We are experiencing the same issue on multiple sites.

@sparkison
Copy link

sparkison commented Apr 20, 2022

Have the exact same issues as @corneliusio using Craft 3.7.20 and Redactor 2.7.5 - 2.10.6 and we are not using multisite.

@ChrisDotNet
Copy link

We have the same issue.

@smockensturm
Copy link

Same here. What's going on @brandonkelly ?

@timkelty timkelty self-assigned this Apr 25, 2022
@stefanfriedrich
Copy link

same issue for us. clients can't edit the content correctly anymore. @brandonkelly

@timkelty
Copy link
Contributor

Working on a fix, thank you all for your patience.

The regression was introduced here: be78c65

Stay tuned for an update ASAP.

@timkelty
Copy link
Contributor

Could you please test this out and confirm it is working:

"craftcms/redactor": "dev-fix-link-replacement",

@stefanfriedrich
Copy link

stefanfriedrich commented Apr 26, 2022 via email

brandonkelly added a commit that referenced this issue Apr 26, 2022
@brandonkelly
Copy link
Member

@stefanfriedrich Thanks for testing! Just tagged 2.10.7 and 3.0.0-beta.3 with the fix.

@sparkison
Copy link

We're still experiencing this issue with Craft 3.7.27.2 and Redactor 2.10.7. Specifically the issues/steps outlined by @corneliusio above:

  1. Only seems to occur when linking an entry, asset, or category. Inserting a custom URL does not appear to be causing this.
  2. If the text being link proceeds all other links in the field, the link is inserted as expected.
  3. If the first item is true and the text being linked follows any other links, the immediately preceding link is overwritten with both the URL and text being defined for the new link, leaving the original text intended to be linked unchanged.

@stefanfriedrich
Copy link

works with normal links, but still causes problems with links zu assets.

@timkelty
Copy link
Contributor

timkelty commented May 3, 2022

@stefanfriedrich @sparkison I can no longer reproduce this with Redactor 2.10.7 (with links to entries or assets):

Here is a video: https://user-images.githubusercontent.com/18329/166471307-93193e01-f38c-4229-9158-80882644919f.mp4

Can you ensure your browser caches are cleared and also clear control panel resource caches?
CleanShot 2022-05-03 at 10 21 27@2x

@sparkison
Copy link

Thanks @timkelty, clearing the control panel resources was the trick! 🎉 I can now confirm things are working with both Craft 3.7.27.2 and Craft 3.7.20 with Redactor 2.10.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.