Links not working as expected in SCEditor

Started by Ramón Cutanda, May 12, 2022, 03:33:40 PM

Previous topic - Next topic

Ramón Cutanda

Hi,

I have been using SMF 2.1 RC4 for some months and, just today, I have upgraded to SMF 2.1.2. Now I have two problems with the editor:

1. [IURL] links work as expected in the preview, but not when the post is published.

2. Before this update, I could paste a link in the editor, and the link would work. Now, however, it pastes plain text.

I am using PHP 8.1.5 and I can reproduce this behaviour both in a clean SMF 2.1.2 setup and with my list of mods:

Ad Managment 3.5d
GDPR Pro 2.0.6d
Anti-spam by CleanTalk 2.35
Pretty URLs 2.4b
Simple Audio Video Embedder 6.0.6
BBC Message Boxes 3.0.1
Sphinx for SMF 1.1
TinyPortal 2.2.2

Next there is a video where my problem is shown. Any help will be greatly appreciated. Thank you.



Dhayzon


GL700Wing

Apparently disabling the 'URL' BBCode for signatures will cause this. Could this be your problem?

See https://www.simplemachines.org/community/index.php?msg=4118154 and https://github.com/SimpleMachines/SMF/issues/7404
Life doesn't have to be perfect to be wonderful ...

Ramón Cutanda

Thank you both for your kind replies. Activating the [iurl] BBC code for signatures have solved the problem with the links in the posts. However, pasting links still doesn't work, as shown from second 32 in my previous video: https://youtu.be/U21Qddf9juE?t=32. It does not work in this very forum either, but it used to work before and it does work in the official SCEditor website.

Thank you once again!


GL700Wing

Quote from: Ramón Cutanda on May 13, 2022, 03:01:32 AMActivating the [iurl] BBC code for signatures have solved the problem with the links in the posts. However, pasting links still doesn't work ...
The links I posted referred to the 'url' BBcode - try also enabling that BBCode ...
Life doesn't have to be perfect to be wonderful ...

Ramón Cutanda

Thank you for the suggestion, but even if activating ALL bbc codes BOTH in the BBC section AND in the signature section, pasting links still does not work. And, as I mentioned in my previous post, does not work in this very forum either.

Thank you once again.

GL700Wing

Quote from: Ramón Cutanda on May 13, 2022, 03:12:29 AMThank you for the suggestion, but even if activating ALL bbc codes BOTH in the BBC section AND in the signature section, pasting links still does not work. And, as I mentioned in my previous post, does not work in this very forum either.

Thank you once again.
Hopefully someone else will be able to help you resolve this issue ...
Life doesn't have to be perfect to be wonderful ...

Kindred

Quote from: Ramón Cutanda on May 13, 2022, 03:12:29 AMThank you for the suggestion, but even if activating ALL bbc codes BOTH in the BBC section AND in the signature section, pasting links still does not work. And, as I mentioned in my previous post, does not work in this very forum either.

Thank you once again.


Ummmmm....  I think you may have some local problem, since you say it affects you on this site, and yet, none of us seem to have any issues posting links here
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ramón Cutanda

Thank you once again for your time and interest in my issue. In the following video you can see the problem I described before but, this time, with https://www.simplemachines.org:

EDIT: I have just noticed that, when recording the video, I had the "Source view" button toggled. However, the result is the same with or without the source view button on or off.



This is my system info:

Computer:      GIGABYTE B550 AORUS ELITE V2
CPU:           AMD Ryzen 9 5900X (Vermeer, VMR-B0)
               3700 MHz (37.00x100.0) @ 4466 MHz (44.75x99.8)
Motherboard:   GIGABYTE B550 AORUS ELITE V2
BIOS:          F14, 01/04/2022
Chipset:       AMD B550 (Promontory PROM19 C)
Memory:        32768 MBytes @ 1796 MHz, 18-22-22-42
               - 16384 MB PC28700 DDR4 SDRAM - Team Group TEAMGROUP-UD4-3600
               - 16384 MB PC28700 DDR4 SDRAM - Team Group TEAMGROUP-UD4-3600
Graphics:      GIGABYTE RTX 3080 VISION OC 10G (GV-N3080VISION OC-10GD)
               NVIDIA GeForce RTX 3080, 10240 MB GDDR6X SDRAM
Drive:         Samsung SSD 970 EVO 1TB, 976.8 GB, NVMe
Drive:         Crucial_CT512MX100SSD1, 500.1 GB, Serial ATA 6Gb/s @ 6Gb/s
Drive:         ST8000DM004-2CX188, 7814.0 GB, Serial ATA 6Gb/s @ 6Gb/s
Sound:         NVIDIA GA102 - High Definition Audio Controller
Sound:         AMD Family 17h/19h - HD Audio Controller
Network:       Intel Wireless-AC 9260 160MHz
Network:       RealTek Semiconductor RTL8125 Gaming 2.5GbE Family Ethernet Controller
OS:            Microsoft Windows 11 Professional (x64) Build 22000.675


Regards.

Kindred

Sorry, although i see what you are talking about, i would argue That our system is working exactly as I expect....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

live627

in ./Themes/default/scripts/jquery.sceditor.js, find

tags: {
a: {
'data-type': ['url']
}
},
format: function (element, content)
{
return '[url=' + decodeURI(element.href) + ']' + content + '[/url]';

replace that with

format(element, content)
{
if (element.getAttribute('data-type') != 'url')
return content;

return '[url=' + decodeURI(element.href) + ']' + content + '[/url]';

Ramón Cutanda

Quote from: live627 on May 13, 2022, 06:57:52 AMin ./Themes/default/scripts/jquery.sceditor.js, find
Thank you so much for the tip!

The code that you provided did not work at first. However, after some trial and error, I only had to change this:

'data-type': ['url']
to this:

href: null
Problem solved!

Thank you once again!

Doug Heffernan

Glad to see that you got it solved @Ramón Cutanda. I am marking this as solved.

Advertisement: