[Skip to main content](#vessel-content)

#   Canonical URLS /administrator/ issue in HIka 2.3.2

##

- **[Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")**
- [![Superpsychics's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31898-superpsychics "View Superpsychics's Profile") Topic Author
- [ Offline](/forum/user/31898-superpsychics)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 5 months ago [\#202691](#202691) by [Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")  *[Canonical URLS /administrator/ issue in HIka 2.3.2](/forum/26-product-category-display/877146-canonical-urls-administrator-issue-in-hika-2-3-2#202691 "-- 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")* was created by *[Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcxNDYtY2Fub25pY2FsLXVybHMtYWRtaW5pc3RyYXRvci1pc3N1ZS1pbi1oaWthLTItMy0yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

11 years 5 months ago [\#202701](#202701) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Canonical URLS /administrator/ issue in HIka 2.3.2](/forum/26-product-category-display/877146-canonical-urls-administrator-issue-in-hika-2-3-2#202701 "-- 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")*

Hi,

Yes, it's quite easy to change.

Change the line: Code:

$xml .= "\t".'&lt;g:link&gt;&lt;![CDATA[ '.hikashop_cleanURL($product-&gt;product_canonical).' ]]&gt;&lt;/g:link&gt;'."\n";

to: Code:

$xml .= "\t".'&lt;g:link&gt;&lt;![CDATA[ '.str_replace('/administrator/','/',hikashop_cleanURL($product-&gt;product_canonical)).' ]]&gt;&lt;/g:link&gt;'."\n";

in the file plugins/hikashop/google_products/google_products.php and that will add the fix.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcxNDYtY2Fub25pY2FsLXVybHMtYWRtaW5pc3RyYXRvci1pc3N1ZS1pbi1oaWthLTItMy0yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")**
- [![Superpsychics's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31898-superpsychics "View Superpsychics's Profile") Topic Author
- [ Offline](/forum/user/31898-superpsychics)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 5 months ago [\#202781](#202781) by [Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")  Replied by *[Superpsychics](/forum/user/31898-superpsychics "View Superpsychics's Profile")* on topic *[Canonical URLS /administrator/ issue in HIka 2.3.2](/forum/26-product-category-display/877146-canonical-urls-administrator-issue-in-hika-2-3-2#202781 "-- 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")*

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](http://www.hikashop.com/support/forum/install-update/874672-checkout-product-listing-menu-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](http://www.spinboom.com/index.php) but to [ www.spinboom.com/SERVERNAME/index.php](http://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcxNDYtY2Fub25pY2FsLXVybHMtYWRtaW5pc3RyYXRvci1pc3N1ZS1pbi1oaWthLTItMy0yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

11 years 5 months ago [\#202803](#202803) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Canonical URLS /administrator/ issue in HIka 2.3.2](/forum/26-product-category-display/877146-canonical-urls-administrator-issue-in-hika-2-3-2#202803 "-- 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcxNDYtY2Fub25pY2FsLXVybHMtYWRtaW5pc3RyYXRvci1pc3N1ZS1pbi1oaWthLTItMy0yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.204 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
