Closed (duplicate)
Project:
Menu Trail By Path
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2013 at 13:53 UTC
Updated:
6 Jul 2015 at 03:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mserinjane commentedComment #2
alarcombe commentedSlightly modified patch file. Previous one needed tweaking slightly to get it to run with drush make.
Comment #3
jastraat commentedI had this same problem and the patch in #2 worked for me.
I think the original function may not work very well when the theme has a THEMENAME_breadcrumb function.
Comment #4
StoraH commentedThanks, the code in patch #2 worked for me too. But I couldn't apply it to latest dev so uploading a updated version.
Comment #5
jumoke commentedThis module simply does not work! Waste of time.
Comment #6
jojonaloha commentedI find that by using hook_page_delivery_callback_alter, this module is basically telling all other modules that it knows better then them what the breadcrumbs should be. In particular I was using Organic Groups, and because the paths aren't always reflective of where you came from, it calls drupal_set_breadcrumb() to set them appropriately.
An example, if you have a node group the path to the group pages are group/node/%/%. This module has no way of knowing that node/% is the parent page and breaks those breadcrumbs. Worse, there is no way to get OG's breadcrumbs to take precedence, aside from putting my own logic in the theme.
With the patch in #2 applied to 7.x-2.0, at least it doesn't override those breadcrumbs.
Comment #7
SeriousMatters commentedThank for all the inputs. But we moved away from hook_init() to hook_page_delivery_callback_alter() due to previous issue 1568804. So changing back to hook_init() won't magically resolve all problems.
Additionally, I was told that using hook_init() is a poor decision for performance reasons. say, we don't want module to run on ajax calls?
Rather, I think the problem is with the way this module uses drupal_set_breadcrumb(). Perhaps menu_set_active_trail() is the way to go. Perhaps remove breadcrumb handling by default or even completely.
Certainly needs more work.
Comment #8
krisgraham commentedIf the inconsistency is a result of ctools-based functionality in general (views, panels) rendering before hook_page_delivery_callback_alter, then it might be worth looking into simply implementing a ctools hook in addition to the callback alter.
If the order of operations issue is more specific to each case, then you might want to look at how menu_position is correcting for panels pages (with panels_pre_render). I've submitted a patch to add a panels_pre_render hook at https://drupal.org/node/2212691
If you're having problems with views you might have success implementing hook_views_pre_render in the same way.
Comment #9
sill commentedThis is a duplicate of https://www.drupal.org/node/2303693 which provides a patch which works.