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

markus_petrux’s picture

Status: Active » Postponed (maintainer needs more info)

If 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?

zdean’s picture

- 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.

markus_petrux’s picture

Nope, 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.

zdean’s picture

Yes, 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).

markus_petrux’s picture

Category: bug » support

Well, 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.

markus_petrux’s picture

Was it fixed?

zdean’s picture

I was not able to fix this.

markus_petrux’s picture

Ok, 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.

markus_petrux’s picture

The problem could come from the method that you have used to override CSS stuff for your site.

Could 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.

zdean’s picture

I 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.

markus_petrux’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

hmm... 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.