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

longwave’s picture

Category: support » bug

This 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.

longwave’s picture

Status: Active » Fixed

Removed from both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.