Closed (fixed)
Project:
Special menu items
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2009 at 20:06 UTC
Updated:
29 Jul 2012 at 18:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
mariano.barcia commentedI checked out the code, and there is a hook_init() with the code addressing this issue. However, it did not seem to have any effect on the breadcrumb building, so I moved it to hook_nodeapi() and it's now working. Attaching a patch for revision. HTH, salud.
Comment #2
marcoka commentedtested, not making a difference here. but i think the problem is with the menutrails module, because that uses drupal_set_breadcrumb, too
Comment #3
andyf commentedSimilar patch here. I used the view op, and left the processing in
hook_init()as well in case there are pages that don't invoke the view op. Also modified the install file to give it a higher weight.Btw specific problem was using it with menutrails, but the patch should work for other modules that play with the breadcrumb in the same way.
Comment #4
nclavaud commentedCould not apply the patch. I had to do it manually.
Anyway, it didn't work for me. _special_menu_items_process_breadcrumb() gets called and works fine, but I still see nolink links in the breadcrumb (though I have checked the module weight in database and flushed all caches).
I have a couple of functions that get called after _special_menu_items_process_breadcrumb(), and particularly this menutrails_views_pre_view() that rebuild the nolink link... :-|
Comment #5
andyf commented@nclavaud which patch did you try? Have you tried adding a
hook_views_pre_view()to this module and just putting in_special_menu_items_process_breadcrumb()?Comment #6
nclavaud commented@AndyF : I was talking about patch #3, and yes, I ended up doing what you suggest (implementing hook_views_pre_view() in special_menu_items) and it solved my problem :-)
Comment #7
andyf commentedCool. It's not elegant, but at least it works :) Would you be able to make a patch and add it to this issue?
Comment #8
gagarine commentedDon't think using node_api for this job is a good idea hook_views_pre_view is a better idea.
Comment #9
retiredpro commented@nclavaud, How did you add those functions to the module? I tried manually patching from #3 and then adding this extra few lines to special_menu_items.module
function hook_views_pre_view() {
_special_menu_items_process_breadcrumb();
}
Comment #10
duaelfrThere is the same issue on the 7.x branch
Here is a patch which could be backported to 6.X version and which fixes the issue elegantly
Comment #11
gagarine commentedcommitted on D7 dev. I keep it active for D6 but the backport will certainly have to change more stuff to make it works.
Comment #12
juampynr commentedI still see this issue in the dev branch of 7.x. It happens that the l() core function calls url() when generating the path, thus encoding it to '%3Cnolink%3E'. This makes that the statement at special_menu_items_init() does not match and the crumb is printed as a link.
Attached is a patch that fixes the issue.
Related: #1394442: Breadcrumbs link is still active after setting <nolink> to a menu item
Comment #13
jax commentedIMO hook_init() is way too soon to do this. I'd move this to hook_process_breadcrumb() which is as late as possible.
Comment #14
jax commentedMy solution:
Comment #15
miaoulafrite commentedallright gentlemen
i found out something that may be useful for you.
in case we have a item, i link it in the breadcrumb to its parent via a theme function
Comment #16
juampynr commentedEmailed the maintainer. This has been active for far too long.
Comment #17
gagarine commentedThanks for the patch #12.
It need to be redone for the last .dev. with those small change.
instead of using url use check_plain to avoid a DB query. Do this work *before* the loop and store in a variable so you dont do a check_plain for each links.
Add a new line
Comment #18
juampynr commentedI cannot reproduce this error anymore :(
Used drupal 7.14 and fresh clone of branch 7.x-1.x-dev of Special Menu Items module.
Is anyone still experiencing this problem? If not, this can be marked as fixed.
Comment #19
gagarine commentedSo let's mark it as fixed. Other changes perhaps had fixed that.
Of course feel free to reopen.
Comment #21
yashadev commentedI still have this problem using 7.x-1.0. Can this be commited to 1.0 as well please?
Comment #22
gagarine commentedUse the dev.