BBCode generates wrong link

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
ErikV122025
Registered User
Posts: 2
Joined: Thu Jan 09, 2025 4:07 pm

BBCode generates wrong link

Post by ErikV122025 »

I've installed phpBB v3.3.14 and using the BBCode url tags generates the wrong url, ie. when I'm posting www.site.com the link gives https://www.mysite.com/phpbb/www.site.com. The allowed_schemes_links do have the standard value http,https,ftp. Whats is the solution for this behaviour?
rxu
Extensions Development Team
Posts: 3983
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: BBCode generates wrong link

Post by rxu »

Looks like phpBB bug.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode generates wrong link

Post by Brf »

When you use that form of URL bbcode, you need to include the http or https as shown in the BBCode help topic.
ErikV122025
Registered User
Posts: 2
Joined: Thu Jan 09, 2025 4:07 pm

Re: BBCode generates wrong link

Post by ErikV122025 »

Thnx very much! I didn't know that .. :)
rxu
Extensions Development Team
Posts: 3983
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: BBCode generates wrong link

Post by rxu »

IIRC www.site.com shouldn't have became https://www.phpbb.com/community/www.site.com before, like it is now in the 1st post here. Unless I'm missing something.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode generates wrong link

Post by Brf »

You are missing something.
The first post is using [url]www.site.com[/url] not the magic www.site.com
User avatar
Steve
Registered User
Posts: 1598
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: BBCode generates wrong link

Post by Steve »

Brf wrote: Thu Jan 09, 2025 5:01 pm You are missing something.
The first post is using www.site.com not the magic www.site.com
But why is it adding this board url at front? Edit: It also happens on my forums.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode generates wrong link

Post by Brf »

Steve wrote: Thu Jan 09, 2025 5:06 pm But why is it adding this board url at front? Edit: It also happens on my forums.
If you are not including the http, it assumes it is a relative link. That is the way the standard http href tag works.
User avatar
Steve
Registered User
Posts: 1598
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: BBCode generates wrong link

Post by Steve »

That needs fixed.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode generates wrong link

Post by Brf »

Steve wrote: Thu Jan 09, 2025 5:40 pm That needs fixed.
Try it yourself.
Put <a href="www.site.com">www.site.com</a> in an html file and see where it goes. That is how the URL bbcode works.
User avatar
Steve
Registered User
Posts: 1598
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: BBCode generates wrong link

Post by Steve »

What forum owner would want to return that URL because of a user's input error? It would be a 404 Frenze.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
rxu
Extensions Development Team
Posts: 3983
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: BBCode generates wrong link

Post by rxu »

Unable to reproduce this on a clean phpBB 3.3.14 install on localhost though. There should be something else affecting that behavior.
Sorry, totally missed that it's about wrapping the link into [url][/url] tags.
But actually that's not even needed because plain www.site.com is getting "magically" translated to the link itself.

Return to “[3.3.x] Support Forum”