- Posts: 22
- Thank you received: 2
Please post all pre-sales questions of all products on this forum
Bug in EShop Breadcrumbs – language not applied correctly
- Christoph
- Topic Author
- Offline
- Junior Member
-
Less
More
3 weeks 5 days ago - 3 weeks 1 day ago #176427
by Christoph
Bug in EShop Breadcrumbs – language not applied correctly was created by Christoph
Edit: That was the wrong forum - please delete. I posted again in the right one. Sorry!
Hi Giang,
I think I discovered a bug in the EShop component affecting breadcrumbs in multilingual sites. The issue occurs because the language parameter ($langCode) is not passed to the function EShopHelper::getCategoriesBreadcrumb().
I noticed that because I get breadcrumbs with a different language in the second sub category, because of a fallback to the site language (in my case German), so when I chose English I get a German entry after the first sub category in the breadcrumbs.Details:
Best regards,
Christoph
Hi Giang,
I think I discovered a bug in the EShop component affecting breadcrumbs in multilingual sites. The issue occurs because the language parameter ($langCode) is not passed to the function EShopHelper::getCategoriesBreadcrumb().
I noticed that because I get breadcrumbs with a different language in the second sub category, because of a fallback to the site language (in my case German), so when I chose English I get a German entry after the first sub category in the breadcrumbs.Details:
- Category pages (/components/com_eshop/view/category/html.php - after comment "//Handle breadcrump")
- The code originally did not pass $langCode so it fall back to German even when choosing English:
$paths = EShopHelper::getCategoriesBreadcrumb($category->id, $parentId); - To fix it, the function should be called like this:
$langCode = Factory::getLanguage()->getTag();
$paths = EShopHelper::getCategoriesBreadcrumb($category->id, $parentId, $langCode); - This ensures that all category names in the breadcrumb match the current site language.
- The code originally did not pass $langCode so it fall back to German even when choosing English:
- Product pages (view/product/html.php)
- The same problem exists here. Originally, the code called:
$paths = EShopHelper::getCategoriesBreadcrumb($categoryId, $parentId); - Since $langCode was missing, the breadcrumb always displayed the default language (usually German), even if the page was in English.
- The fix is to pass the current language explicitly:
$langCode = Factory::getLanguage()->getTag();
$paths = EShopHelper::getCategoriesBreadcrumb($categoryId, $parentId, $langCode); - After this change, both the parent categories and the product’s direct category appear correctly in the current language.
- The same problem exists here. Originally, the code called:
Best regards,
Christoph
Last edit: 3 weeks 1 day ago by Christoph.
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
-
- Offline
- Administrator
-
3 weeks 1 day ago #176498
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Bug in EShop Breadcrumbs – language not applied correctly
Hello Christoph,
Thank you for submitting the topic here. I am checking this for you and I will get back to you shortly on your right topic.
Sincerely, Giang
Thank you for submitting the topic here. I am checking this for you and I will get back to you shortly on your right topic.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc, Giang Dinh Truong, Dang Thuc Dam
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.