VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: derek webster on June 01, 2022, 11:07:42 AM

Title: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: derek webster on June 01, 2022, 11:07:42 AM
Hi I'm not a developer so not sure If this is a bug or not.

I noticed on the Category/Browse views. that the breadcrumbs data did not display ANY sub category and indeed the whole hierarchy was gone.
I narrowed this down to line 179 in components/com_virtuemart/views/category/view.html.php

I'm using VirtueMart 4.0.2 10661

The line in question
$category = $categoryModel->getCategory($this->categoryId, false);

I replaced with the line from VM 3.8 - and the breadcrumbs re-peared
$category = $categoryModel->getCategory($this->categoryId);



Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Milbo on June 16, 2022, 23:52:59 PM
Hmm, thank you for your report.

The false just says "load without children", but it should load the parents. So i wonder a bit how this makes trouble with the breadcrumbs.
Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Wedal on July 06, 2022, 09:32:14 AM
Hi, VirtueMart 4.0.4 10688 - the bug still here. Fix it, please. Joomla breadcrumbs does not work correctly with VM4 categories and products.
Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Studio 42 on July 06, 2022, 10:25:53 AM
Max, i fixed this for a customer last week using same trick using last VM.
I do not checked why, but this trick works
Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Milbo on July 06, 2022, 22:18:14 PM
ehrm, what was your trick? :-)
Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Jörgen on July 06, 2022, 23:45:12 PM
My guess is:

QuoteThe line in question
Code: [Select]

$category = $categoryModel->getCategory($this->categoryId, false);


I replaced with the line from VM 3.8 - and the breadcrumbs re-peared
Code: [Select]

$category = $categoryModel->getCategory($this->categoryId);

Jörgen
Title: Re: Breadcrumbs bug caused by components/com_virtuemart/views/category/view.html.php
Post by: Studio 42 on July 07, 2022, 15:17:19 PM
Same fix

$category = $categoryModel->getCategory($this->categoryId);