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

#   notrans not work for canonical

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

2 years 11 months ago [\#357840](#357840) by [Ebrahim](/forum/user/79902-ebrahim "View Ebrahim's Profile")  *[notrans not work for canonical](/forum/26-product-category-display/907510-notrans-not-work-for-canonical#357840 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 4.4.1 -- PHP version -- : 8.2.13  Hello, after updating to version 5.0.2, categories are translated twice by Canonical.  Therefore, if &quot;#notrans#&quot; is used, the &quot;#notrans#&quot; tag is removed in the first translation, and in the second translation, the phrase is translated.  First: views/category/view.html.php  Second: views/category/tmpl/listing.php")* was created by *[Ebrahim](/forum/user/79902-ebrahim "View Ebrahim's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4.4.1
-- PHP version -- : 8.2.13

Hello, after updating to version 5.0.2, categories are translated twice by Canonical.

Therefore, if "#notrans#" is used, the "#notrans#" tag is removed in the first translation, and in the second translation, the phrase is translated.

First:
views/category/view.html.php
Code:

$element-&gt;category_canonical = hikashop_translate($element-&gt;category_canonical);

Second:
views/category/tmpl/listing.php
Code:

$canonicalUrl = hikashop_cleanURL(hikashop_translate($this-&gt;element-&gt;category_canonical));

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc1MTAtbm90cmFucy1ub3Qtd29yay1mb3ItY2Fub25pY2FsP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

2 years 11 months ago [\#357844](#357844) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[notrans not work for canonical](/forum/26-product-category-display/907510-notrans-not-work-for-canonical#357844 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 4.4.1 -- PHP version -- : 8.2.13  Hello, after updating to version 5.0.2, categories are translated twice by Canonical.  Therefore, if &quot;#notrans#&quot; is used, the &quot;#notrans#&quot; tag is removed in the first translation, and in the second translation, the phrase is translated.  First: views/category/view.html.php  Second: views/category/tmpl/listing.php")*

Hi,

Thanks for your feedback.
This change was made following an issue we fixed here:
[ www.hikashop.com/forum/product-category-...l-urls.html?start=20](https://www.hikashop.com/forum/product-category-display/907095-issue-ith-canonical-urls.html?start=20)
However, we over corrected for the categories listing as we made it consistant with the product view.

So, to keep the consistency with product / listing, we'll be replacing the line:
$canonicalUrl = hikashop_cleanURL(hikashop_translate($this-&gt;element-&gt;category_canonical));
to:
$canonicalUrl = hikashop_cleanURL($this-&gt;element-&gt;category_canonical);
in views/category/tmpl/listing.php for the next release.

The following user(s) said Thank You: [Ebrahim](/forum/user/79902-ebrahim "View Ebrahim's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc1MTAtbm90cmFucy1ub3Qtd29yay1mb3ItY2Fub25pY2FsP3RtcGw9bWFya2Rvd24=) 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.065 seconds

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