[SOLVED] Force Canonical Category doesn't work? [VM 4.0.2]

Started by Rune Rasmussen, August 17, 2022, 10:15:48 AM

Previous topic - Next topic

Rune Rasmussen

QuoteEDIT: Note that it was caused by PWT SEO, disabling it makes the Canonical URLs correct.
EDIT2: Changing the default setting for 'Self referencing canonical' to 'No', in the configuration for the PWT SEO System plugin, also helps if you like to continue using PWT SEO.

Isn't there anyone else noticing that the 'Force Canonical Category' doesn't work for Canonical URLs. Does it work for you, have it ever worked?


As you might be aware of, there is a field for 'Force Canonical Category' on the product edit screen, right bellow the 'Categories' selection field.


I do expect this to be working for setting a Canonical URL in the source code of the site (since it's named Canonical), to tell Google etc. that it's the same product listed in multiple categories (having the same Canonical URL for all listings), to avoid it being read as a duplicate. But that doesn't seem to be the case now ...?


Let's say I add a product to both 'Sales' and 'Phones' categories, and select 'Phones' also on 'Force Canonical Category'. Then I visit FE and browses into the 'Sales' category, select to view the product details, and looks at the source code - the Canonical URL is set to the 'Sales' category. Then I browse into the 'Phones' category, select the same product etc., and now the Canonical URL is set to 'Phones' category - so it's changing and not using the selected 'Force Canonical Category', affecting your SEO ratings ...

VM 4.0.2 10661, Joomla! 3.10.10 using vmbeez3


VM Configuration -> SEO Settings

SEO Disabled: Not selected   
Use product link suffix: Selected
Seo Suffix: -details
Translate Strings: Selected
Transliterate slugs: Selected
Use Product and Category IDs: Selected
Use full category tree for product links: Selected
Strict mode: Not selected
SEF for cart links: Selected

J! Global Configuration -> SEO Settings
Search Engine Friendly URLs: Yes
Use URL Rewriting: Yes
Add Suffix to URL: Yes
Unicode Aliases: No
Site Name in Page Titles: After
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

GJC Web Design

Just tested on VM3.8.8 and there it is working correctly ...  canonical remains the same no matter what category you accessed a product from

and on VirtueMart 4.0.7 10693

https://virtuemartshop.eu/j4/shop/wear/mister/zipper-pullover-detail
https://virtuemartshop.eu/j4/shop/wear/lady/zipper-pullover-detail

canonical remains   <link href="https://virtuemartshop.eu/j4/shop/wear/lady/zipper-pullover-detail" rel="canonical">
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Rune Rasmussen

Using the same configuration as I mentioned above, or something different?
And also tested the same on vmbeez3?
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

GJC Web Design

same config... but tested on J4.1.5

I can attach VirtueMart 4.0.7 10693 if u want to try it....
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Rune Rasmussen

OK, sorry, forgot to mention it's on Joomla 3.10.10


I guess Joomla! 4 is different, and it's long till everyone can make that move ...
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

GJC Web Design

I think if it works now on J4 it will work on J3  - your welcome to try but I don't have the time at the moment
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Rune Rasmussen

#6
Yep, the problem is it doesn't work at the moment for us, in any template - and as fare as I know it never did.

Anyhow no 4.0.7 available, nor any changes to SVN for some time. Have VM gotten into stealth development?
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Rune Rasmussen

Noticed they all are products having variants to select, so wonder if that has anything to say also.


Anyhow, something must be different somewhere, in settings or anything else if it works for some, but not others.
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

Rune Rasmussen

#9
You're right, it works - if we disable PWT SEO.


So it seems like it's PWT SEO causing our issues ...  ::)

Thanks for pushing me in the right direction!
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team