Closed (fixed)
Project:
Menu Minipanels
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
21 Oct 2010 at 19:29 UTC
Updated:
8 Jan 2011 at 05:42 UTC
Jump to comment: Most recent file
I've recently rebuilt a theme from Zen 1.x to Zen 2.x. After installing Menu Minipanels, my site logo for the new theme "disappeared." In fact, somehow the url for the logo of the previous theme is being inserted instead of the new one. Clearing the cache under "Performance" works initially, but after clicking any link on the site, the logo swaps out again. Disabling the module fixes everything.
If any additional information is helpful for troubleshooting, let me know.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | primary_links_menu_minipanels.png | 20.77 KB | sammo |
| #14 | menu_minipanels_948784_1.patch | 2.73 KB | sammo |
| #13 | menu_minipanels_948784_1.patch | 2.7 KB | sammo |
| #8 | menu_minipanels_948784_1.patch | 3.3 KB | sammo |
Comments
Comment #1
willieseabrook commentedThanks, this is interesting. I noticed this once in my development environment, but didn't associate the issue to menu_minpanels.
I'll look into it now.
Comment #2
gjerdery commentedAnother symptom I perhaps should have reported initially, but didn't because it wasn't repeatable is that my db's panels_mini table key got reset to 0 and would no longer auto-increment, immediately after installing this module, then adding a mini panel. I couldn't tell if these were related, or random.
Comment #3
Robert_W commentedSame problem here, when Menu Minipanels is enabled my site logo gets replaced with just the name of the site (so no picture, just text). This is caused because enabling the module sets the src of the logo to just 'logo.png', instead of the full path to the logo.
So it changes this:
to this:
I actually looked into this problem, but could not find a solution.
Edit
After some more testing and trying I found out that this module actually completely overrides the theme settings, even if you set the sites name, logo and slogan off in the themes settings, they are still displayed. When you turn the module off, the name, logo and slogan disappears (if you set this in the theme settings).
I searched on to fix this problem, I finally came across something that causes this strange behavior. These lines are responsible for overriding the theme settings:
If you comment these lines out (for testing purposes) everything works fine (right logo is displayed, etc.). I know that just throwing these lines away isn't a good thing to do, so I will try to think about a nicer solution.
Edit 2 (DONE?!)
Well, after some hours of reading through code and trying things...I think I may have the solution!
On the earlier mentioned lines
the 'theme_get_setting()' method is used, this method overrides the changes in the theme setting. It is better to use theme_get_settings() (mention the S and the end) instead. This method retrieves all the theme settings.
So change the earlier mentioned lines to:
At this point you must also change the menu_minipanels_preprocess_links_at_init() function because there is a foreach loop in it and thus this function requires an array. But were not giving this function any array anymore, so remove the foreach loop! You must get this:
It should now be fixed, I did test it and honestly it works for me. I don't know how to create patches, so I tell it you this way. I don't know if any problem will arise after this change, but I didn't see one.
Comment #4
robbertnl commentedSubscribing
Comment #5
willieseabrook commentedThanks @Robert_W, great work narrowing down the issue.
I'll be fixing this in the next dev release.
Comment #6
pixelpreview@gmail.com commentedthe patch in #3 breaks the javascript effect of menu mini panel on my site ???
without patch I confirm the problem with the logo ... and theme
Comment #7
sammo commentedThere look to be a few issues with the patch in #3. I've just got my own patch working that also fixes the JS / JQuery issues. I've got to tidy up the code a bit, and it will be a bit hacky, but I'll post it in a bit anyways.
Comment #8
sammo commentedHi #willieseabrook nice module. I think I have patched this issue. But if anyone can test that would be good.
I've adjusted the first issue mentioned in #3. It needed to call the menu_primary_link() function. It was just passing in 1 or 0 not any actual links.
There was no need to change the second block of code mentioned in #3, and it didn't do anything anyway as $links was passed into the function but $link was called. I guess you got lucky #Robert_W. I did manage to get your patch to work at first but I think it relied on certain aspects of the old code being cached, but not really sure?
I've added some code to hack the Drupal_add_js function on lines 301 - 302 and 331 - 333. Basically it was being called twice per minipanel menu item. This appeared to be creating arrays for items like event => [mouseover, mouseover] in the settings for Qtip. As it was expecting strings e.g. event => mouseover, it caused JavaScript to break. Code below:
Sorry it is a bit hacky, I'm not good with jQuery yet, but the patch should help until the module can be properly fixed.
Comment #9
sammo commentedNeeds review
Comment #10
sammo commentedComment #11
pixelpreview@gmail.com commentedparse error
the eval
eval('$menu_minipanels_drupal_add_js_count['.$minipanel_name.'] = 0');
must be
eval('$menu_minipanels_drupal_add_js_count['.$minipanel_name.'] = 0 ; ');
Comment #12
sammo commentedThanks, did it work for you when you fixed this?
Comment #13
sammo commentedJust tested this and it still works for me as the variable I initialise with the eval gets assigned and initialised automatically in the second bit of code again anyway.
So it didn't matter for me that the eval didn't parse (I guess my server is less strict on that as it didn't even give an error). I've fixed the eval line and left it in as it makes what the patch is doing clearer.
Comment #14
sammo commentedMy eval code still isn't parsing so I have removed it as indicated above.
Comment #15
talatnat commentedA repost from a closed (duplicate) issue:
@sammo: The patch at http://drupal.org/node/948784#comment-3836822 worked. Thanks.
In my case, the patch for this issue: $options[check_plain($panel_mini->name)] = check_plain($panel_mini->display->title); instead of the original: ($panel_mini->title); still resulted in an empty select box. However, when I used ($panel_mini->admin_title); I got to select a minipanel.
I guess I am doing something incorrect, but when I create a minipanel by adding content menu--> primary links, I still get WSOD. How are you using primary links?
Comment #16
sammo commentedHi @ talatnat maybe we are not on the same page. I've attached a screen grab of menu minipanels working with primary links for me. I'm not getting a WSOD when I set this up.
Comment #17
pixelpreview@gmail.com commentedyes it works for me whith eval fixed
Comment #18
talatnat commented@sammo: Hi. Thanks, I "finally" got it working -- one of the primary links from a previous version was still enabled, and was causing some kind of WSOD recursion.
Two things: 1) Not sure if it is related to the second bit of code in the patch, but the minipanel appears twice, one above the other. I'll check if the patch got added correctly, or if its because of my styling 2) I still require admin_title to see the select box.
Added: a) I got parse error for the original eval function, but the minipanel shows twice: eval('$menu_minipanels_drupal_add_js_count['.$minipanel_name.'] = 0 ');
b) If, I switch to pixelpreview's eval, I don't get a parse error, but the minipanel does not display at all.
c) If I remove the second part of the drupal_add_js hack, I don't get a minipanel menu displaying. Adding it back, gives me the double panel (although I still don't know if this is related to the minipanel name being called twice).
Added clarification: Re: "the minipanel shows twice". Actually, there is one large minipanel, but the minipanel's content is duplicated twice inside, one above the other.
Comment #19
jippie1948 commentedI got it also working with all the patches proposed above with the same result as in #18 by Talatnat: "There is one large minipanel, but the minipanel's content is duplicated twice inside, one above the other."
Comment #20
sammo commented@jippie1948 Hi not sure what would be doing that. I could be a styling thing. Try inspecting with firebug. I'm not too convinced about this module anyways. There are some issues with it as far as search engine optimisation is concerned. I was going to give http://drupal.org/project/megamenu a go, as I have seen some nice implementations.
Also make sure you have the up to date versions of jquery_ui etc..
Comment #21
asb commentedSame issue on a customized Fusion subtheme. I haven't yet look closer into it as the 'menu_minipanels' module also breaks lots of other Fusion styles.
Can anyone else confirm these major compatibility issues with Fusion?
Edit: Located #954582: Compatibility with Fusion Theme confirmed which recursively points back to this issue ;)
Comment #22
willieseabrook commentedThanks @gjerdery and for your great diagnosis work @Robert_W.
Something was indeed going on with the theme_get_setting call. Haven't used your patch here, but did use theme_get_settings (plural). Your diagnosis saved me loads of time fixing this.
Committed to dev.
Comment #23
willieseabrook commented