miniBB ®miniBB®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · Manual ·
Bugs miniBB Support Forums / Bugs /  
 

miniBB 3.7.2 — canonical link opens the forums front page

 
Author marsbar
Associated Member
#1 · Posted: 5 Oct 2026 11:19
Hi, Paul.

The canonical link in 3.7.2 may have a small bug. I do not use mod_rewrite.

On a topic page, {$canonicalMeta} gives:

<link rel="canonical" href="https://www.tintinologist.org/forums/index.php?action=vthread%26forum=4%26topic=34">

This address opens the forum front page, not the topic. The separators are %26, but they should be &amp;:
index.php?action=vthread&amp;forum=4&amp;topic=34

The code is in bb_functions.php (Canonical URLs block). It was added in v3.7 and is the same in v3.7.2. Forum lists, profiles and page 2+ use %26 too, but I only tested topics.

For now I have removed {$canonicalMeta} from the header. Can you please check?

Thanks,
marsbar

Author Paul
Lead Lead Developer
#2 · Posted: 6 Oct 2026 09:57
Thanks for pointing this out, and you must be very right on this — an ampersand in a canonical meta tag URL should be written as an HTML entity (&amp;) inside the HTML attribute.

Not sure why I've put the encoded version of it initially... certainly there was some (wrong) reason for it, but I don't remember which one.

There are only certain types of pages this tag is generated for — the front forums, forums, topics and user profiles. Since user profiles are not indexed by default, it's not critical to have the wrong canonical there; anyway, the fix is quite easy: in the /* Canonical URLs */ block of bb_functions.php -> load_header(), whenever you find the %26 code, it should be replaced to &amp;

Except this line:

$canonicalUrl=str_replace('&amp;', '%26', call_user_func('add'.$urlType.'URLPage', $urlp, $GLOBALS['page']));
should be present as:

$canonicalUrl=call_user_func('add'.$urlType.'URLPage', $urlp, $GLOBALS['page']);
I'll fix it in the upcoming new version of miniBB which hopefully could be released in a week or so.

Author marsbar
Associated Member
#3 · Posted: 6 Oct 2026 13:09
Thanks, Paul! Looking forward to the new release. :)

Bugs miniBB Support Forums / Bugs /
 miniBB 3.7.2 — canonical link opens the forums front page
Share Link Share Topic's Link
 Click this icon to move up to the quoted message

 ∅ ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.


⇑