Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using Ajax_load (required by Editable Field module) breaks a nice_menu menu on my page (the background changes color). When I disable ajax load, the nice menu works fine.
I've submitted this issue in the Nice Menus que as well #693652: Ajax Load alters background color of menu because I'm not sure if this is an ajax load problem or a nice menus problem.
Any help is greatly appreciated.
Thanks.
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedIf you haven't already, please try with latest development snapshot of Ajax Load and Nice Menus, then report back if that makes a difference.
Theme used? Does it happen with other themes? Do you see javascript errors?
Are you using css/js aggregation? Works better when disabled?
Comment #2
zdean CreditAttribution: zdean commented- I am using it with an Acquia Marina sub-theme
- I tested on Pushbutton and it does NOT seem to cause the same problem on that theme
- There are no errors
- No aggregation
- The menu works fine when A.L. is disabled
If this is a problem with Acquia Marina, any ideas what might be the cause so that I can post a reply on the issue submission on their que?
Thanks.
Comment #3
markus_petrux CreditAttribution: markus_petrux commentedNope, no idea. I do not use Nice Menus, so I cannot really tell what's going on.
Have you tried with latest dev versions of both modules?
The dev versions contain code from CVS that may include changes that fix this issue.
Comment #4
zdean CreditAttribution: zdean commentedYes, I'm using both dev versions....what seems to be happening is that after the ajax action, the menu background goes back to the default value (overrides what I have in css).
Comment #5
markus_petrux CreditAttribution: markus_petrux commentedWell, the job of Ajax Load is that. When an Ajax request is performed, the response may provide information to load additional css/js files that were not present on the page before the Ajax request.
If your custom CSS is lost after an Ajax request, that means Ajax Load module had to load an additional CSS file that was not present on the page. Ajax Load won't attempt to load a CSS file that was already present on the page.
Using something like Firebug, it should be possible to view which CSS files are originally loaded with the page, and which CSS files are loaded as a result of an Ajax request. This should help you see why your custom CSS is lost.
The problem could come from the method that you have used to override CSS stuff for your site.
I'm switching the category of the issue because I'm inclined to think this is mostly a support request related to the way you're overriding CSS classes.
Comment #6
markus_petrux CreditAttribution: markus_petrux commentedWas it fixed?
Comment #7
zdean CreditAttribution: zdean commentedI was not able to fix this.
Comment #8
markus_petrux CreditAttribution: markus_petrux commentedOk, so you need to debug this using firebug to figure out which CSS files are loaded after the Ajax request. This should help to see if there's really a wrong stylesheet being loaded or what.
Comment #9
markus_petrux CreditAttribution: markus_petrux commentedCould you please describe how are you overriding the CSS classes?
It could happen that the file you're using defines CSS selectors that are superseded when new CSS files are loaded as a result of the job that performs Ajax Load module after an Ajax request. Maybe you need to use more specific selectors, or even try with !important.
Comment #10
zdean CreditAttribution: zdean commentedI actually gave up on this back in February b/c I needed to wrap up the project for a client. But, I do remember that I didn't do anything unusual with CSS...I created a subtheme with the appropriate CSS file to override the default CSS. Sorry I can't offer more detail on this.
Comment #11
markus_petrux CreditAttribution: markus_petrux commentedhmm... so, with no more information, we cannot do anything else here. I'm closing the issue, and it can be re-opened whenever someone can provide a method to reproduce and analyze the problem. Possible causes for the symptom have been described, so it could really be just a matter to re-organize how and where CSS classes are overridden.