Breadcrumbs acting strangely

Phoca Gallery - image gallery extension
neillsun
Phoca Member
Phoca Member
Posts: 10
Joined: 23 Nov 2014, 22:59

Breadcrumbs acting strangely

Post by neillsun »

I found an old post about problems using Joomla SEF and multiple menu links... I couldn't find a date for this post and no Joomla version was mentioned. I suspect this is the problem I am experiencing. :( I am using J3.3.6

I have a Multimedia Gallery Menu item, with two menu items under it (Photos and Videos). each of these displays a list of categories with a different parent category.

If I go to the Multimedia>Photos the breadcrumbs show as Home\Multimedia Gallery\Photos. If I click on a category I get:
Home\Multimedia Gallery\Photos\Multimedia\Photos\Gallery. This is how the breadcrumbs are supposed to work. I need to get it to ignore everything except the Gallery name. I have set the Menu component settings to display only the Gallery name.

It gets stranger when I select the second menu (Multimedia Gallery>Videos).

Here it shows Home\Multimedia Gallery\Videos. All fine. But if I click on a category the breadcrumbs now show:
Home\Multimedia Gallery\Photos\Multimedia\Videos\Gallery!

Actually, I've just noticed the SEF URL shows as /index.php/multimedia-gallery/photos/category/gallery... so probably is the SEF thing.

How can we fix this?

Thanks,
N.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Breadcrumbs acting strangely

Post by Jan »

Hi, yes, this is caused by SEF and searching for the right menu link (if there are two, this can be a problem). Unfortunately this seems to be a problem only on specific serves, I have tried to simulate it on different server but never got such output so I cannot test and do some protection against it.

Try to see e.g. categories view:
components/com_phocagallery/views/categories/view.html.php

and at the bottom, there _prepareDocument method, there you can try to modify the code of the breadcrumbs data :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply