CATEGORY_CANONICAL not updating correctly

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #170956

I've added a new url path into the category canonical however it still seems to have /product/listing" inside the canonical tag.

Is there any other way to resolve this?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #170983

Hi,

I am sorry but I can't follow you.
Would it be possible to have more details about what you are doing/modifying, what "changed" or "not changed" ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #171133

I'm trying to update the field "CATEGORY_CANONICAL" on the category I've got setup.

The URL via the menu is www.mydomain.com/categoryname but the canonical on that page is www.mydomain.com/categoryname/product/listing .

After entering the same URL as the menu, saving the page and clearing Joomla's cache the category canonical is still www.mydomain.com/categoryname/product/listing .

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #171144

Hi,

So you're saying that you currently have www.mydomain.com/categoryname/product/listing in the canonical URL field of your category, and that you change it to www.mydomain.com/categoryname and after you click on save it's back to www.mydomain.com/categoryname/product/listing as if it didn't save successfully ?
In that case, it would mean an error with the saving query to the database.
Turn on the "debug mode" of the Joomla configuration and try again and that should display an error with a MySQL query. And in that case, clicking on the "check database" button of the configuration of HikaShop (provided that you have the latest version of HikaShop), should fix the problem. Otherwise, please provide the error message.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #171258

Hi Nicolas.

Sorry for not being more clear on this. The edit category page still has the Canonical I've entered in "CATEGORY_CANONICAL" (so it's saving correctly if I go in and out of the category). The front end of the website just has www.mydomain/com/categoryname/product/listing as the canonical.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #171298

Hi,

We don't have the problem on our end.

Could you provide a screenshot of the configuration of your category and the link to the page with the canonical tag so that we can see that ?
Also, could you provide the version number of Hikashop you're using ?

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #171930

The screenshot is viewable here

The page I'm working is http://www.cartronix.co.uk/repair-services/speedometer-repair were if you check the source code you'll see the canonical goes to www.cartronix.co.uk/repair-services/spee...pair/product/listing

Version HikaShop [1312231536]

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #171942

Hi,

You version is not up to date, this one is from december 2013 so many things have been improved regarding the canonical urls.
Thanks to update your version and see if the problem is solved.

ps: don't forget to do a backup before anything ;)

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #172062

Hi.

I've done the update on the site. I've resaved the category and still the same.

The canonical is still <link href=" www.cartronix.co.uk/repair-services/spee...pair/product/listing " rel="canonical" />
and should be www.cartronix.co.uk/repair-services/speedometer-repair

Last edit: 10 years 2 months ago by boxchilli.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #172065

Hi,

Thanks to provide a backend access via private message, don't forget to give us the url of that topic.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #172200

Hi Xavier.

Details sent.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172310

Hi,

If you look at the code source of the page
www.cartronix.co.uk/repair-services/speedometer-repair

You will see that the "canonical" is set twice.
The second one is added by HikaShop ; for the first one I can't tell you, maybe a plugin or the template.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #172476

Hi.

We don't have a plugin which creates Canonical and we're using the gantry framework for the template.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #172485

I've found the problem which is the Joomla Sef Plugin with the code
" if ($uri !== $link)
{
$doc->addHeadLink(htmlspecialchars($link), 'canonical');
}
"

Is there anything to add to force this not to run on Hikashop pages?

Last edit: 10 years 2 months ago by boxchilli.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 1
10 years 2 months ago #172508

For anything else having this issue. I've added to sef.php on line 53
" if ($uri !== $link)
{
if (JRequest::getVar('option')!=='com_hikashop'){
$doc->addHeadLink(htmlspecialchars($link), 'canonical');
}
}"
So this will stop the canonical showing on Hikashop pages.

The following user(s) said Thank You: Xavier

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum