Joomla! 1.0.12 appears to have a pathway bug. If you use a component other than com_frontpage for the “Home page” of Joomla – meaning the first link in mainmenu and the page that appears when you load the root of the Joomla! site – then when you click on an article you get a “Double pathway”, for example the pathway will state “Home > Home > Title of article”. The Home, or whatever you named this link, part will be duplicated. It isn’t a big problem but it does look unprofessional on your site!

I looked for ages for a fix to this problem, and eventually found it but the site I can not find the site I originally downloaded this fix from. It is courtesy of Reinhard Hiebl – www.hieblmedia.de (whos site is in German, one reason why I’m saving it here). I thought I would throw it online here for your download. The fix is in two parts of code in /includes/pathway.php.

At line 54 in includes/pathway.php:

// Fix for dublicate home if home have childs //
// by Reinhard Hiebl -- www.hieblmedia.de //////
// get first published item
$query = "SELECT id"
. "\n FROM #__menu"
. "\n WHERE published = 1"
. "\n AND parent = 0"
. "\n AND menutype = 'mainmenu'"
. "\n AND access <= " . (int) $my->gid
. "\n ORDER BY ordering"
. "\n LIMIT 1"
;
$database->setQuery( $query );
$first_mitem = $database->loadResult( 'id' );
////////////////////////////////////////////////

And at line 284 in includes/pathway.php immediately after “$item =& $mitems[$mid];”:

// Fix for dublicate home if home have childs //
// by Reinhard Hiebl -- www.hieblmedia.de //////
if ( $item->id == $first_mitem && !$item->parent ) {
break;
}
////////////////////////////////////////////////

I also have the file zipped up so you can just replace includes/pathway.php with this file. Note that this is for version 1.0.12 only, so it might not work with previous or newer versions.

pathway.zip

5 comments
  1. How to adapt the module pathWay to the search module?

    Section_A > Category_B > “Article”
    If you when will back to Category_B see you [Blog – Content Category]

    If You click search “Article” pathWay sign:
    Section_A > Category_B > “Article”
    If you when will back to Category_B see you [Table – Content Category]

    do always what to display [Blog – Content Category]

  2. How to adapt the module pathWay to the search module?

    Section_A > Category_B > “Article”
    If you when will back to Category_B see you [Blog – Content Category]

    If You click search “Article” pathWay sign:
    Section_A > Category_B > “Article”
    If you when will back to Category_B see you [Table – Content Category]

    do always what to display [Blog – Content Category]

Comments are closed.

You May Also Like

Comprehensive .htaccess guide

The AskApache blog has a great comprehensive guide to .htaccess. A must…

One Line Linux Command to Print Out Directory Tree Listing

My professor sent us this little one liner (ok, I had to…

A Simple Java TCP Server and TCP Client

Following up on my previous post, we also had to demonstrate a…

Delete all directories more than a week old

This simple linux bash script will delete subdirectories in a directory based…