Closed (fixed)
Project:
DHTML Menu
Version:
7.x-1.x-dev
Component:
User Interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2008 at 08:16 UTC
Updated:
14 Jun 2009 at 07:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
cburschkaHi, can you please view the source of the page and post the menu markup here? It's the part that starts with
<ul class="menu">. It is necessary to determine whether this issue is caused by Javascript or server-side PHP.Also, please view the page in Firefox or another browser with a Javascript Error Console, and post any error messages triggered by Javascript.
Comment #2
GavinC commentedHi, sorry to be a pain where do i get his from
Hi, can you please view the source of the page and post the menu markup here? It's the part that starts with <ul class="menu">. It is necessary to determine whether this issue is caused by Javascript or server-side PHP.I am really new at this, sorry.
I have run the Java Error Console, and got no complaints
Comment #3
cburschkaWhen you right-click anywhere on the page in your browser, you should see a menu that includes an option like "View Page Source" or something similar depending on what browser you are using. When you click it, you get a window with HTML code. Copy that into a text file, then attach the file to this issue (see below).
Comment #4
GavinC commentedThank you for pointing that out.
Ok. Done. I am running Firefox 3. Attached is the source text file.
Comment #5
GavinC commentedCould I hassle you busy guys and gals for an update?
Thank you
Comment #6
GavinC commentedcould i have an update please? As this is stopping the site from going live :(
Comment #7
cburschkaUm, this is not a menu block. This is a block generated by ubercart, using its own markup.
Since the block does not go through the menu processing system, there is no way for DHTML Menu to load the full menu tree below these items, which is necessary to expand the menus dynamically. That means it can't get any DHTML.
The other problem is that this block "pretends" to be a menu block by being styled with
class="menu", which confuses DHTML Menu's Javascript. That is the reason you cannot simply visit the page; DHTML Menu "captures" the click as it believes the block to be an actual menu.The most I can do is ensure that DHTML Menu uses a different class to avoid collisions (although it's a bit irksome). That would allow you to click through that catalog menu statically, without any Javascript. There is no way to get DHTML on your Catalog menu without massive changes to Ubercart.
Comment #8
cburschkaHere's a patch. After applying it to the module, you should see the following difference:
- When clicking the links in your "Catalog" block, you should be taken to the page of that item, instead of nothing happening at all.
---
Turns out I can't change ul.menu, because that is added in theme_menu_tree. Overriding this function is possible, but as the last bug has shown, this overriding technique is not yet perfect and should therefore be avoided when possible. However, I can add an extra class to the
<li>element, the next best thing.Comment #9
GavinC commentedThank you for the patch, i have got it running. Is there any type of menu (like DHTML) that can be used against UberCart's Catalog Block?
Comment #10
cburschkaThanks for testing the patch. I'll commit it in a moment. :)
I'm afraid no, there are no modules for what you want. All dynamically expanding menu modules I've seen on this site focus specifically on menus (and most specifically on menu blocks, like this one before 6.x-3.x). There is no module yet that specifically overrides uc_catalog's block generation, which it would need to do to work. You could pay someone in the Paid Services forum to write it for you, but I don't know how complex this task is or how expensive it would be.
I have filed a feature request in the Ubercart project, for using the menu API in uc_catalog. If they do this, then it will automatically become compatible with DHTML Menu, i18n Menu and most other menu-related addons.
Comment #11
cburschkaOkay, this one is committed to DRUPAL-6--3.
6.x-3.4 will probably be out later today, once I've checked the bug queue for any remaining issues that can be fixed.
Comment #13
cburschkaEven wihout Ubercart, this extra class is a very good policy and should be in the D7 branch.
Comment #14
cburschkaThis should take care of all of it. I'll be testing it a bit in a moment.
Comment #15
cburschkaAdded the strict selectors to CSS too, and used
leaf dhtml-menu-fake-leafrather thandhtml-menu fake-leaf leafto make sure the fake-leaf items aren't matched later on byli.dhtml-menu.leaf.Comment #16
cburschkaArgh, code-style.
Comment #17
cburschkaThis particular change works. It will not fix a separate bug related to menus where DHTML Menu is supposed to be disabled. I have therefore committed this change to HEAD.