No Code Attached Yet
avatar stefanoel
stefanoel
11 Dec 2025

Steps to reproduce the issue

Joomla 5.4.1, multilanguage website.

Italian menu structure:

  • Home
    • News
    • etc...
  • etc...

mod_breadcrumbs config:

  • Home: show
  • Text for home entry: empty, no value
  • Last: show

Expected result

Visiting the News page, I expect to see in the breadcrumbs:
Home > News

Actual result

Home > Home > News
(duplicated Home link)

System information (as much as possible)

PHP 8.2.28

Additional comments

Checking the mod_breadcrumbs code and doing some test I guess that the problem is in getHomeItem() function (line 74 of src/Helper/BreadcrumbsHelper.php), setting the link property:

$item->link = 'index.php?Itemid=' . $home->id;

In tmpl/default.php, line 33 the code:

   // Get rid of duplicated entries on trail including home page when using multilanguage
        for ($i = 0; $i < $count; $i++) {
            if ($i === 1 && !empty($list[$i]->link) && !empty($list[$i - 1]->link) && $list[$i]->link === $list[$i - 1]->link) {
                unset($list[$i]);
            }
        }

attempts to remove the duplicated item, but I can see that the two Home links have different "link" value, here's a dump:

array(3) {
  [0]=>
  object(stdClass)#1258 (2) {
    ["name"]=>
    string(4) "Home"
    ["link"]=>
    string(20) "index.php?Itemid=102"
  }
  [1]=>
  object(stdClass)#1256 (2) {
    ["name"]=>
    string(4) "Home"
    ["link"]=>
    string(57) "index.php?option=com_content&view=article&id=1&Itemid=102"
  }
  [2]=>
  object(stdClass)#1257 (2) {
    ["name"]=>
    string(4) "News"
    ["link"]=>
    string(53) "index.php?option=com_unipgnews&view=elenco&Itemid=402"
  }
}

The first Home (generated by the getHomeItem function) has "index.php?Itemid=102" and the second has "index.php?option=com_content&view=article&id=1&Itemid=102", so the duplicate check fails, leaving two items instead of one.

avatar stefanoel stefanoel - open - 11 Dec 2025
avatar joomla-cms-bot joomla-cms-bot - change - 11 Dec 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Dec 2025
avatar alikon
alikon - comment - 16 Dec 2025

@stefanoel can you submit a pull request ?

avatar stefanoel
stefanoel - comment - 17 Dec 2025

Fix: mod_breadcrumbs duplicates Home link in multilanguage #46581
@alikon I never created a PR, please check if everything is ok... thanks!

avatar richard67 richard67 - change - 17 Dec 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-12-17 16:33:23
Closed_By richard67
avatar richard67 richard67 - close - 17 Dec 2025
avatar richard67
richard67 - comment - 17 Dec 2025

Closing as having a pull request. See #46581 .

avatar alikon
alikon - comment - 17 Dec 2025

@stefanoel you already made pr's 😃

Add a Comment

Login with GitHub to post a comment