Lists of products are littering the breadcrumb with the categories of the final product node in the list. Is this new behaviour in 7.x-3.0-rc4, or a result of the recent release of views? I wasn't seeing this in rc3. I had to turn off catalog breadcrumbs as it has become useless.
On my site, I have a list of featured products in a block. This last product in that list always is responsible for what is displayed in the breadcrumb, even when viewing a full product node. My desired behaviour is for full product nodes to set the breadcrumb.
Essentially uc_catalog_node_view is invoked for every product in my lists and the $view_mode is 'full' for each product.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1419128-breadcrumb-display-price.patch | 725 bytes | longwave |
Comments
Comment #1
longwaveSo if you turn your featured products block off, the problem goes away? uc_catalog_node_view should only be invoked with $view_mode as 'full' when viewing a complete product node, not for teasers or field listings. Can you provide an export of your view?
There have been a couple of bug fixes to uc_catalog recently regarding multilingual taxonomy terms, but nothing that should change this behaviour.
Comment #2
age3141592 CreditAttribution: age3141592 commentedCorrect, turning off the featured products block off makes the problem go away. For simplicity I only mentioned this block, but I also have a "what's hot" page that gives the same problem.
Here's the featured products block view export:
Comment #3
age3141592 CreditAttribution: age3141592 commentedI reverted to previous versions of the views module, and get the same results. So it's not something that was introduced there.
Agreed, the recent uc_catalog changes should not have affected this behaviour. Must be something I did, but I'm at a loss to figure it out at the moment.
Comment #4
age3141592 CreditAttribution: age3141592 commentedOkay, I've narrowed it down.
I created a new version of the block view, and added the fields I wanted one at a time.
Added Content: Title - works as expected
Added Content: Image - works as expected
Added Stock: Level (Level) - works as expected
Added Product: Display price (Price) - *** breadcrumbs get littered ****
removed Product: Display price (Price) - works again as expected
Added Product: Sell price (Sell price) - works as expected
Added Product: Display price (Price) - *** breadcrumbs get littered ****
So this is a result of Display price being used in a view.
Comment #5
longwavePlease test the attached patch.
Comment #6
age3141592 CreditAttribution: age3141592 commentedPerfect. Tested this out and it works as expected. The block view, and page views no longer litter the breadcrumbs. Full nodes do correctly set the breadcrumb. Many thanks.
Comment #7
longwaveCommitted.
Comment #9
age3141592 CreditAttribution: age3141592 commentedI'm reopening as I found that this same problem exists with product kits.
It can be fixed by tweaking uc_product_kit_view.module
That is, change $build = node_view($product) to $build = node_view($product,$view_mode)
Comment #10
longwaveCommitted the change noted in #9, thanks.