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
|
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
|
myraltis
Advanced Member
203 Posts |
Posted - 08/18/2026 : 11:08:32
Thank you Vince, that's worked a treat.
Tim
|
| |
|