sorry....
WorldFallz - July 20, 2007 - 16:57
| Project: | Lucid menu |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Disable TinyMCE or just set default to disabled-- lucid still disappears. Disable IMCE and the Lucid menu's are fine with and without Tinymce. I have no clue which is the problem, Lucid or IMCE, but its definitely not tinymce. Lucid and Tinymce work fine as long as IMCE is disabled.

#1
turns out lucid menus works with either IMCE OR TINYMCE enabled but not both. If you enable both but remove the imc_set_tinymce.js file and refresh the browser cache, lucid menus comes back. Still working on figuring out exactly what the problem is.
#2
Its just a syntax error. Open imce_set_tinymce.js in any text editor
and change the following line (line #3) from
$(window).load(imceInitiateTinyMCE);
TO
$(window).onload(imceInitiateTinyMCE);
Thanks it... lucid menus work!
#3
ok, its not really a syntax error. it just prevents imce from placing its icon in the tinymce dialog box. so, either users can enter an image with the default tinymce dialog box OR click on the "insert image or link" link under tinymce to use IMCE. Not ideal , but acceptable for me because I have to have my lucid menus working. hopefully, someone who knows more will take a look eventually and fix this the right way.
#4
Well, I really appreciate this.
I should note that what I did was wrap the js library in a module exposing as many configuration options as I could, I was very disappointed to find that I was unable to help many people who had trouble with the js component itself. So I apologize for my lack of activity. Any patches could easily expect to get in if they can help others. My main expertise is in aggregation as you can see in my Aggregation module.
I am however planning on utilizing jquery in creating even a better component for the next release. Unfortunately this will be quite some time away. Wish I had a sponsor for this :P
Your efforts are much appreciated. I just wanted to point out that I am monitoring things here and this module is definitely on my to-do list as soon as I get any free time.
#5
hey... no problem and no need to apologize. I know how time consuming this work can be, I just wish I knew more to be able to diagnose this further.
Far as i can find out, its seems to have something to do with the call back from tinymce to the imce file browser. Why that's affecting Lucid I have no clue. I just know that if that little browser icon (browse.gif) appears on the tinymce dialog box (and it doesn't matter if its inline popups or not), the lucid menus vanish. poof. Even if I actually disable the imce browser integration such that when the browse button is clicked it goes no where and does nothing, it still doesnt work. its mere presence means lucid will vanish. very odd.
my gut is that it does have something to do with the underlying js menu system and not your wrapper. I have nothing to back that up tho. My expertise in troubleshooting has nothing to do with code knowledge-- i just have a painfully logical mind and can disable/enable things one at a time to narrow down the location of the problem. But i have no skills to repair it, unfortunately. I would help if I could. having tried all the dynamic menu modules, lucid was hands down the best for me. and ive spent a lot of time customizing my sites with it. no way im abandoning it, lol.
if there's anything else i can do to help with this i'd be happy to. just let me know.
thanks again for a great module. my sites are pretty complicated and would be nearly unnavigable without drop downs. i dont know what i'd do if lucid didnt work.
#6
over in the IMCE issues thread, I also posted this info. The owner their was kind enough to point out the problem is that the external js that lucid menu wraps around uses window.onload method instead of the jquery window.load method. I did a quick search of the code, and it turns out that line only appears once in the doimenudom.js file on line 1020. seems to me it shouldn't be too hard to fix the one line, so I'm going to try. if i have any success ill post back.
#7
Well, it was even easier than I thought.
Open doiMenuDOM.js and change line 1020 from
window.onload=Initialize;
TO
$(window).load(Initialize);
and boom... you can have lucid... tinymce ... and imce... all at the same time!
Probably not the "proper" way to do it, but I don't care.... I have the functionality I need for my users.
#8
It's great that you fixed it, but what does your change do exactly? :)
Just so I get some insight into what you did.
Thanks
#9
I should have been more descriptive. I was just so happy to have fixed it I wasn't thinking clearly.
Ok first the problem. The problem is because the lucid menu module is a wrapper for javascript menu package. The menu package doesn't use jquery which, as I understand it, is the basis for using javascript in drupal. Both lucid and tinymce (and also fckedit also, btw, which had the same problem) issue a command that says basically wait for the doc to load before proceeding. The problem is, the menu package is using the pure javascript version of the command and tinymce/fck is using the jquery version. If anyone who understands the issue thinks I've erred in my explanation please correct. I'm basically just hacking my way through.
Ok, now the fix. All I did was locate pure javascript "onload" command in the menu package (which, luckily, only appears once) and change it to match the jquery version of the command used by tiny/fck and probably every other drupal module that uses javascript to do its work.
The "proper" way to fix this is probably to rewrite the entire menu package to use jquery, but that is both beyond my skill and time constraints at the moment. Another way to fix it would be to use a different and jquery based menu package for lucid to wrap around. When and if I get some free time I'll try to do this. Its beyond my skills at the moment, but it's a good way to learn.
hope that explanation was what you were looking for.
#10
Yeah, that was plenty. :)
I've applied your fix to all my sites now and I haven't seen any ill effects.
Good work and thanks again. *thumbs up*
#11
No idea why that picture was attached to my last comment. :)
#12
wohoo! thanks! :-)
I've been trying to fix this for a while.