Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Help with Canonical tag please
Author « Topic »  

myraltis
Advanced Member

203 Posts

Posted - 08/12/2026 :  06:14:58  
Hi All,

Currently running v7.8.8 (due to update challenges) and trying to add the Canonical tag feature that was released with v7.8.2.

I've followed the instructions here: https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=116031 and, although the Products and Categories pages are showing the Canonical tag as expected, the proddetails page is missing a forward slash, e.g. I'm seeing:

<link rel="canonical" href="https://www.hm-online.co.ukA73-Indirect-Lighting-Coving">

when I'd expect to see

<link rel="canonical" href="https://www.hm-online.co.uk/A73-Indirect-Lighting-Coving">

I've inspected a random selection of products and they are all missing the / between domain name and product.

It's doing the same on my development server. e.g.

<link rel="canonical" href="http://localhostA73-Indirect-Lighting-Coving">

Any suggestions would be greatly appreciated.

Thanks,
Tim

myraltis
Advanced Member

203 Posts

Posted - 08/14/2026 :  02:59:21  
I have now upgraded my test server to 7.9.5 and am still getting the issue.

Could someone suggest a fix please?

Vince
Administrator

43585 Posts

Posted - 08/14/2026 :  10:50:46  
Could you please try going to your ECT Admin -> Main Settings page and make sure your store url's have a trailing slash?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

myraltis
Advanced Member

203 Posts

Posted - 08/14/2026 :  11:15:46  
Hi Vince,

In Store Admin / Main Settings / Store Settings, Store URL is set to http://localhost/
HTTPS Store URL is currently blank.

Tim

midvalleydrifter001
Ecommerce Template Expert

USA
987 Posts

Posted - 08/14/2026 :  19:20:45  
Hi Tim,

Try checking your vsadmin/includes.php file for $seoprodurlpattern. If your products are located at the website root, make sure it is set as:

$seoprodurlpattern="/%s";

rather than:

$seoprodurlpattern="%s";

The ECT canonical code appears to connect the Store URL and product URL pattern directly, so the pattern needs the leading slash.

Patrick


myraltis
Advanced Member

203 Posts

Posted - 08/16/2026 :  11:24:22  
Hi Patrick,

Thanks for your reply.

Unfortunately, $seoprodurlpattern="/%s"; is already set. I've tried $seoprodurlpattern="%s"; to see what would happen and it makes no difference. Indeed, commenting the line out completely still returns entries such as:

<link rel="canonical" href="http://localhostA73-Indirect-Lighting-Coving"> i.e., no forward slash before product name.

I know the includes file is being used, as renaming it to _includes.php causes other errors, as does commenting out the rest of the lines in the SEO block within includes.php. For reference, my SEO block is as follows:

$seodetailurls=TRUE;
$seocategoryurls=TRUE;
$detlinkspacechar="-";
$seocaturlpattern="/category/%s";
$seoprodurlpattern="/products/%s";
$seomanufacturerpattern="/manufacturer/%s";

I do have another copy of the vsadmin directory using a different name (as recommended in the install documentation), and am making sure to mirror any code changes to includes.php. I am, of course, refreshing the page after each change, but am rather stumped.

Tim

midvalleydrifter001
Ecommerce Template Expert

USA
987 Posts

Posted - 08/16/2026 :  17:09:41  
Hi Tim,

Thanks for checking that. Since changing or removing $seoprodurlpattern has no effect, that rules out my suggestion.

It now appears that the product-detail canonical URL is being constructed independently of $seoprodurlpattern, possibly within vsadmin/inc/metainfo.php, and the separator is not being inserted between the Store URL and the product path.

As the issue remains with v7.9.5, Vince may need to check the code that populates $canonicalurl.

One small point: the SEO block shown contains:

$seoprodurlpattern="/products/%s";

while your expected canonical places the product at the website root:

http://localhost/A73-Indirect-Lighting-Coving

If the product is intended to remain at the root, I would expect the pattern to be:

$seoprodurlpattern="/%s";

However, since changing that setting did not affect the canonical output, it does not appear to be the cause of the missing slash.

Patrick

myraltis
Advanced Member

203 Posts

Posted - 08/18/2026 :  01:59:49  
Thanks again Patrick.

Hopefully, Vince will be able to resolve.

Tim

Vince
Administrator

43585 Posts

Posted - 08/18/2026 :  02:15:57  
Hi Tim
It is indeed a bug so apologies for that but the fix is in the updater in the vsadmin/inc/metainfo.php script.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

myraltis
Advanced Member

203 Posts

Posted - 08/18/2026 :  11:08:32  
Thank you Vince, that's worked a treat.

Tim
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000