Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: minky on July 26, 2022, 06:11:48 AM

Title: Insert a link not working
Post by: minky on July 26, 2022, 06:11:48 AM
When I use 'insert a link' it works fine when I preview my reply but when I post the reply containing the link it does not work.  Had no problem prior to upgrade to 2.1.2



Title: Re: Insert a link not working
Post by: Arantor on July 26, 2022, 06:13:47 AM
Does it work here?
Title: Re: Insert a link not working
Post by: minky on July 26, 2022, 06:48:30 AM
No, it changes HTTP to HxxP and has unactivated in red at the end.

Like someone else I have found on my forum if I 'post' then go to Quick edit and hit save link is changed to correct syntax and works fine.
Title: Re: Insert a link not working
Post by: Arantor on July 26, 2022, 06:52:09 AM
Hmmm, so when you say "doesn't work", how does it not work? How exactly are you adding the links?
Title: Re: Insert a link not working
Post by: Kindred on July 26, 2022, 10:09:08 AM
changing http to hxxp is a mod in use here which prevents spammers from adding links with a brand new account.

If that is what's happening on your own site, then you probably have a similar mod installed, but you have it configured incorrectly.
Title: Re: Insert a link not working
Post by: minky on July 26, 2022, 12:52:59 PM
hxxp is not what happens on my site, I have two mods tinyportal and Cleantalk.

I have had smf forum since 2005, no problem with links. I know how they should look in the post and now they do not look right nor do they work until I have used quick edit - save, then they look right and work.

I open a site in a tab copy the address, select insert link, paste the address in input field, put text in the other input field.  I preview it it looks right and works.

I save the post and the link is not formatted correctly until after the quick edit trick.

1st image is at preview(link as it should be), 2nd is after posting.


Screenshot 2022-07-26 at 17-49-02 Chat 8 - Page 11.png

Screenshot 2022-07-26 at 17-50-10 Chat 8 - Page 11.png

 
Title: Re: Insert a link not working
Post by: Arantor on July 26, 2022, 01:18:57 PM
Um, action=post is not going to work for you seeing that it's the link to the full reply page, and SMF will *always* disable that link.

If you want to link to a topic, the link should be index.php?topic=123.0 or similar, not have an action=post in it.
Title: Re: Insert a link not working
Post by: minky on July 26, 2022, 02:46:22 PM
I only used that url as an example of the results I get, it can be any url from another tab i.e. a newspaper site, BBC, Met office so on and so forth ANY URL !

I just went on my forum made a link to Rightmove, after posting it looks like the following and obviously will not work..

Rightmove (https://www.rightmove.co.uk/)

It does though look correct and work on preview, and will look/work after quick edit - save.

(nofollow) added by smf.
Title: Re: Insert a link not working
Post by: Arantor on July 26, 2022, 03:22:42 PM
Let's see for me then.

Bare URL: https://www.rightmove.co.uk/

Manual url bbcode manual URL code (https://www.rightmove.co.uk/)

I haven't previewed, just saved.
Title: Re: Insert a link not working
Post by: minky on July 26, 2022, 03:50:55 PM
All I can ask is you register on my forum, verylittlehelps.com and try it there, and see if you get any ideas.

Or I can create a temp membership for you
Title: Re: Insert a link not working
Post by: minky on July 28, 2022, 05:21:25 AM
Apparently I'm not the only one with the problem on my forum nor is it only my forum that has the problem.
Title: Re: Insert a link not working
Post by: Arantor on July 28, 2022, 05:45:11 AM
As demonstrated, this site doesn't have the problem, but the first thing that comes to mind is that you've gone into the bbcode configuration and disabled the url bbcode which would give you the look as described.

This site also doesn't have many mods so I'd be interested to know what mods you have if that doesn't solve the problem.
Title: Re: Insert a link not working
Post by: minky on July 28, 2022, 08:38:15 AM
url bbcode is enabled, it has never been disabled.  I have tinyportal and Cleantalk installed.
Title: Re: Insert a link not working
Post by: Arantor on July 28, 2022, 09:09:54 AM
Weird. Can you upload your Sources/Subs.PHP file please? (As an attachment, not pasted into the body of a post.)
Title: Re: Insert a link not working
Post by: minky on July 28, 2022, 11:37:25 AM
Yes. and further to the url bbcode subject if it was disabled why would links work fine after using quick edit/save.

Thank you for trying to help an old man.
Title: Re: Insert a link not working
Post by: Diego Andrés on July 28, 2022, 11:47:24 AM
Also check if the URL bbc is enabled for signatures, this is a known bug that makes the URL fail in posts.
https://github.com/SimpleMachines/SMF/issues/7404
Title: Re: Insert a link not working
Post by: Arantor on July 28, 2022, 02:59:39 PM
Yeah, that's a very good shout, Diego - I asked for Subs.php to verify the actual definition was intact (which it is), and that's the next thing, because what happens is that the signature enabled options end up corrupting the regular post ones, which leads back to the disabling things it shouldn't, with the described behaviour.
Title: Re: Insert a link not working
Post by: minky on July 28, 2022, 03:17:41 PM
Thank you Diego, on a first test run that has solved the problem.
Thank you Arantor it does appear to be a known bug.
Lets look forward to a fix update.

Help much appreciated.

Strange how QUICK EDIT-SAVE resolves the link issue.
Title: Re: Insert a link not working
Post by: Han on November 05, 2022, 07:22:17 AM
Is there already a fix for this. I have the same link-problem on my forum as Minky had.
I have no mods and all my BBC-codes en BCC-tags are checked. Nothing has solved the problem.
Title: Re: Insert a link not working
Post by: Illori on November 05, 2022, 08:42:37 AM
Quote from: Diego Andrés on July 28, 2022, 11:47:24 AMAlso check if the URL bbc is enabled for signatures, this is a known bug that makes the URL fail in posts.
https://github.com/SimpleMachines/SMF/issues/7404

have you done this?
Title: Re: Insert a link not working
Post by: Han on November 05, 2022, 08:58:08 AM
Yes, as I have written before all my BBC-codes and BCC tags are checked (on).
Title: Re: Insert a link not working
Post by: Diego Andrés on November 06, 2022, 05:45:26 PM
Quote from: Han on November 05, 2022, 08:58:08 AMYes, as I have written before all my BBC-codes and BCC tags are checked (on).

Your forum (profile link) is on SMF 2.0.19, so none of the above applies to you.
You should probably open a new topic in the 2.0.x board?
Title: Re: Insert a link not working
Post by: Han on November 06, 2022, 10:20:28 PM
I have a testforum that is a copy of my working day to day forum. I perform big changes like the upgrade from 2.0.19 to 2.12 first on my testforum to see what happens and If there are problems to fix. When all is ok I do the upgrade also on my working forum.
Url of my testforum is : https://www.pcnavigator.nl/kruimel/ That is the SMF 2.1.2 forum that had the testlink problem.
Title: Re: Insert a link not working
Post by: Diego Andrés on November 06, 2022, 10:23:50 PM
Could you attach a screenshot of the issue?
The fix for this topic issue was merged here: https://github.com/SimpleMachines/SMF/pull/7565
Title: Re: Insert a link not working
Post by: Han on November 06, 2022, 10:52:51 PM
I made the screenshot that you requested. Picture on the top is a message with a tekstlink in it and the code that the forumsoftware makes. Bottom pictur is the output after posting the message. The link is not clickable.

I don't understand what the fix is on the github page. I have to change something in subs.php??

Title: Re: Insert a link not working
Post by: Han on November 06, 2022, 11:09:02 PM
Correct me it i'm wrong. To fix the problem i need to replace a line 1595 in my subs.php

Old code:
1595 if (!empty($parse_tags))
New code:
1595 if (!empty($parse_tags) && $message === false)
Title: Re: Insert a link not working
Post by: Han on November 06, 2022, 11:26:37 PM
Just made the change for line 1595 in my subs.php and the problem is solved.  :)

Tnx for your help!!
Title: Re: Insert a link not working
Post by: Diego Andrés on November 06, 2022, 11:42:16 PM
Excellent!
Just make sure you revert it once the 2.1.3 patch comes out, or it will give you an error in that line when installing the patch  :)
Title: Re: Insert a link not working
Post by: Han on November 07, 2022, 06:26:37 AM
OK I will do that. Is there any estimated timeframe for the 2.1.3 patch?
Title: Re: Insert a link not working
Post by: Steve on November 07, 2022, 08:56:41 AM
Quote from: Han on November 07, 2022, 06:26:37 AMIs there any estimated timeframe for the 2.1.3 patch?
As always, the answer to that is 'when it's ready'. We don't give out estimated timeframes.
Title: Re: Insert a link not working
Post by: Kindred on November 07, 2022, 03:38:07 PM
.....    that being said, in this case, the answer is "sooner rather than later" :D
Title: Re: Insert a link not working
Post by: Steve on November 08, 2022, 06:16:10 AM
Don't get them all excited ...  :D