Reviewed & tested by the community
Project:
Menu Trails
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2009 at 23:54 UTC
Updated:
11 Oct 2011 at 09:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunInstead of a complex UNION, why not simply use ORDER BY?
Powered by Dreditor.
Comment #2
grendzy commentedgood idea; revised with ORDER BY.
Comment #3
Stephen Scholtz commentedTried your patch, worked just fine for me!
Comment #4
nedjoDuplicate of #475684: Menutrails assignment fails if menu item is in any menu, which is older and also has a patch.
Comment #5
rkendall commentedI have tested the patch at #2 which works fine, and fixes the problem as described in this issue.
The issue this was marked as a duplicate of seems to be describing different issues (#475684: Menutrails assignment fails if menu item is in any menu), so I have removed the duplicate status.
Thanks grendzy for the patch!
Comment #6
sunWhy did we add an hard-coded assumption about the default menu? I think that belongs into a separate issue/patch. It seems like we can simply default to an empty string?
Powered by Dreditor.
Comment #7
rkendall commented@sun - thanks for looking at it. Your question is worth asking, but I don't think it is really a problem.
As far as I can tell, the only time it would make a difference to the functioning is when a node is linked to multiple menus but not the chosen 'menutrails_menu' (with one of those linked menus being the primary-links). In this case, why would a completely random result be any better than giving priority to the primary links?
The behaviour of the patch in #2 makes sense to me.
Maybe in the future an interface could be provided to give an order of priority to all available menus, however such a feature would only be useful to a handful of people.
Comment #8
william.lai commentedThanks, the patch work for me too.
Comment #9
andyf commentedIt would be great to get this patch committed - this particular bug's caught me out in two successive sites (memory like a sieve!) and it'd be nice to put it to rest!
It seems to me that the choice of whether to default to primary links or not should be linked to what is displayed on the admin screen. Currently the admin screen defaults to primary links, so it makes sense to me to do the same in code (as in patch in #2). Unless I've missed something...? (An alternative would be to add an extra option on the admin screen to represent no preference and modify the code as sun suggests in #6.)
Comment #10
weseze commentedI've got this patch up and running on 5 installs now. Works perfectly! Please commit this.