Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2010 at 04:56 UTC
Updated:
6 Jul 2011 at 14:21 UTC
I'm unsure of the logic behind this, but it confused me so thought I'd raise a discussion to establish why (and document for future folk seeing the same).
uc_product.module has the following code near the head of the function uc_product_form()
$location = array();
$location[] = menu_get_item('admin');
$location[] = menu_get_item('admin/store');
$location[] = menu_get_item('admin/store/products');
$location[] = menu_get_item('admin/store/settings/products');
$breadcrumb = array(l('Home', ''));
foreach ($location as $item) {
$breadcrumb[] = l($item['title'], $item['path']);
}
drupal_set_breadcrumb($breadcrumb);
This changes the node create form breadcrumbs to take people "back" to the product settings screen.
Depending on store settings, these paths may not be accessible to the user viewing the breadcrumbs.
Does anyone understand this behaviour well enough to explain it?
Related: #719996: Store Admin Breadcrumb Is Displayed To Sellers
Comments
Comment #1
longwaveThis code has been present since 5.x-1.x-alpha7 but I can't see why it is useful, and as noted it displays links to users who may not have permission to visit them. Bumping for possible discussion, but if there are no complaints I think it should be removed from both 6.x and 7.x.
Comment #2
longwaveRemoved from both branches.