Text component does not remove text with link or insert a link to text

I’m using Tutor 15.1.0.
In Studio, I added a Text component. I edited the Text component, added a text, and insert a link to that text using the text editor toolbar.
When I saved the insert link modal I could still see the link was inserted but when I hit save in the Text component, the link was removed.
I managed to link the text after many attempts but when I delete that text, it was not deleted.
Does anyone experience the same thing?

I tracked server logs and there was no errors.
I inspected the request in the browser and I found the link was removed in the request body.

After playing with it for awhile, I found some more interesting behaviors.
If I select a text and click the link icon to insert a link and then click Save, the link is not inserted, but if I make some more edit like adding a space or dot in the end of the text and then click Save, the link is inserted.
If I don’t select any text, I just click the link icon and add a link and text then click Save, the link is inserted.
So the error happens in 2 cases:

  1. Select a text, click the link icon to add a link and then click Save immediately.
  2. Ctrl + A to select everything and then press backspace to delete all, click Save immediately, the content is not deleted.

Dear @Anh_Vu_Nguy_n

Thank you for bringing this to attention.

I will test this in Olive to try replicate the errors and then take further action on this and/or reply here.

1 Like

@Anh_Vu_Nguy_n I tested it here now: Authn | null

(1) I have no issue adding links in any manner. Works for me. Maybe it was just a bug on your browser, which could happen from time to time for anyone. In that case, delete the component and add a new one and try again. What do you think?

(2) I agree this is also the case for me. I will bring this up with the Build-Test-Release (BTR) Working Group in the next meeting. It’s not a “showstopper” so this may not get a fix right away.

For the 1st issue.
I’ve tried on the same server as yours.
I’ve made a video on how to reproduce the issue.

1 Like

This sounds similar to a bug we found just before the olive release, where changes were only saved if the text was changed. If your edit only changed markup (for example, adding a link or changing styling) it wouldn’t be saved.

However, this was fixed before the olive release in https://github.com/openedx/edx-platform/pull/31212 (there’s a video recording demonstrating the issue on the pull request).

How did you upgrade to Tutor 15.1.0?

Are you using the new Text editor? (have you turned on the waffle flag ``new_core_editors.use_new_text_editor?)

Peter Pinch
MIT Open Learning

I tried on 2 servers, one of them I did turn the flag on but then I turned it off because it didn’t work for me.
I’ve also tried on the tutor demo server, these issues are still there.

I upgraded using this command.
pip install --upgrade “tutor[full]”

@Anh_Vu_Nguy_n @pdpinch

This has been added to the next BTR Working Group agenda: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3620012033/2023-01-09+BTR+Meeting+notes


Turns out I was wrong about the fix getting into the olive release. It wasn’t merged until November.

@Asad_Ali opened a backport PR into olive.master and I just merged it.

1 Like

@pdpinch Thank you for the explanation.
Can we have this fixed in open-release/olive.1 ?
it’s rather annoying when I add links, images, or anything that does not change the text.

@Anh_Vu_Nguy_n You should be able to fix the issue in Tutor by cherry-picking commit 5af42f8ba3 from edx-platform in Tutor, right here: tutor/Dockerfile at 67f9c092d232ba9d476523519967aa7716712f66 · overhangio/tutor · GitHub
Would you like to open a PR? If not I can do it.

@regis Please do it. Thank man!

Here is the PR: fix: backport fix for html component editing in studio by regisb · Pull Request #780 · overhangio/tutor · GitHub

1 Like