Skip to main content

Canonical URLS /administrator/ issue in HIka 2.3.2

More
11 years 4 months ago #202691 by Superpsychics
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.4.34

Hey,

I am still using Hikashop 2.3.2 and made a lot of custom changes that will not update easily. I was wondering if there is an easy workaround to fix this issue with the canonical URLs including /administrator/. That was addressed in the 2.3.5 update:

The products URLs from the XML generated by the Google Products plugin with the backend trigger would contain /administrator/ in them if they were generated out of the canonical URL of the products

Is there a way I could manually fix this in 2.3.2 without updating Hikashop? Thank you

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

More
11 years 4 months ago #202701 by nicolas
Hi,

Yes, it's quite easy to change.

Change the line:
Code:
$xml .= "\t".'<g:link><![CDATA[ '.hikashop_cleanURL($product->product_canonical).' ]]></g:link>'."\n";
to:
Code:
$xml .= "\t".'<g:link><![CDATA[ '.str_replace('/administrator/','/',hikashop_cleanURL($product->product_canonical)).' ]]></g:link>'."\n";
in the file plugins/hikashop/google_products/google_products.php and that will add the fix.

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

More
11 years 4 months ago #202781 by Superpsychics
Thank you Nicolas,

My main problem is with the product urls when I use canonical urls

As we discussed in the past:
www.hikashop.com/support/forum/install-u...nu-links.html#189308

Canonical urls are behaving strangely on my live site. They tend to point my server address and not the relative address. meaning that /index.php... in the canonical URL in the products is not pointing to www.spinboom.com/index.php but to www.spinboom.com/SERVERNAME/index.php

You advised me to update back then but since I want to avoid updating, is there a way to fix that too?

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

More
11 years 4 months ago #202803 by nicolas
Updating would be best because the fixes done in that area are across several files and not just one or two lines.
But first check that the live_site setting of your configuration.php is correct on your website.

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

Time to create page: 0.180 seconds
Powered by Kunena Forum