Author Topic: Bug in breadcrumbs generation  (Read 5446 times)

doorknob

  • Jr. Member
  • **
  • Posts: 151
Bug in breadcrumbs generation
« on: June 07, 2009, 03:41:49 am »
The basis for creating the breadcrumbs is to mimic the vm home page and then add additional strings. The code for extracting the home page just extracts all vm menu items and uses the first one. Most of the time this will be the 'home' page but if the 'home' page is deleted and re-created, a different menu item will be selected as the basis for the breadcrumbs. The query needs to be more specific and select the menu item that drives the home page.

ps_session (line 463 in build 1760) should be changed from:
Code: [Select]
$db->query( "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart'
AND published=1");
to:
Code: [Select]
$db->query( "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart'
AND published=1 AND params LIKE '%page=shop.index\\n%'");
Regards
Phil

chrism

  • Jr. Member
  • **
  • Posts: 56
Re: Bug in breadcrumbs generation
« Reply #1 on: June 15, 2009, 13:59:26 pm »
Phil,

I suffer from duplicate breadcrumbs here www.getupandgrow.com i'm going though your various posts in an attempt to fix it, from what i'm reading im optomistic, however i cant see the replacement code in the post above?

Thanks
Chris
Chris
www.getupandgrow.com online store and more....

doorknob

  • Jr. Member
  • **
  • Posts: 151
Re: Bug in breadcrumbs generation
« Reply #2 on: June 15, 2009, 18:29:04 pm »
Chris,
It was possible to see the revised code by clicking on the code and using the right arrow on the keyboard but to make it more obvious, I edited the code and put in line breaks
Phil

fire2

  • Beginner
  • *
  • Posts: 41
Re: Bug in breadcrumbs generation
« Reply #3 on: June 15, 2009, 18:42:18 pm »
In VM 1.1.3 you won't find those lines in ps_session that need to be replaced. I didn't find them, so I guess it is only in 1.1.4.
currently using:
Joomla 2.5.8
VM 2.0.14

doorknob

  • Jr. Member
  • **
  • Posts: 151
Re: Bug in breadcrumbs generation
« Reply #4 on: June 15, 2009, 18:47:37 pm »
As I said in my post, I'm using build 1760.
Phil

hotelathome

  • Jr. Member
  • **
  • Posts: 129
Re: Bug in breadcrumbs generation
« Reply #5 on: March 02, 2010, 08:07:42 am »
I found these lines in my vm 1.1.3 and this fix totally worked!!
I had all my breadcrumbs and my URL's for that matter starting with towels (the first product on my menu list)
Now everything is starting with the correct category.
you rock!!!