2

The rendering of my pages on my website have slowed down drastically. When I turn on the error console I get the image below that shows the error:

Warning: reference to undefined property D.cache[a][d]

You can see a screenshot below:

enter image description here These warnings continue until the browser memory becomes bloated, the browser locks up, or the page simply takes over a minute to load!

Takes a minute to load

I am at a loss for how to debug this issue b/c when I open the file cited in the warning, it is the long minified jquery script.

How can I go about fixing this issue?

2

This is obviously not a problem in Drupal core. This mean the the issue is in one of three places:

  • The theme
  • Custom module (developed by you)
  • Contrib module from Drupal.org

I can think of two approaches to go about and fix this.

Debugging

Replace the minified JS file(s) with non minified versions and start debugging.

Experiment

Try disabling modules/theme at turn until the problem disappears and try to pin point the part in the module/theme that causes the problem and from there try to find a solution.

Personally I would go for the experiment route, as this is often the fastest way to gain initial results.

| improve this answer | |
0

Turn off strict mode in your browser.

| improve this answer | |
0

The error comes from misc/jquery.js, and happens even when going through the installation procedure. So nope, it doesn't come from contrib, theme or custom module, but from core itself.

After looking further into things, it seems to be JQuery-specific. I replaced the jquery.js file with the most recent, minified version. Problem still arised. Then with the most recent development (so not minified) version. Problem still exist. Then did the same thing with jquery.form.js. Still no solution.

Now, though, if I look at the errors it gives me (only on pages with JS, like the modules page, or the progress bar during installation), I get explanations like this for the errors:

Jquery.js, ln. 2525:
anonymous function does not always return a value
return; 

Jquery.js, ln. 443:
anonymous function does not always return a value
else return; 

Jquery.js, ln. 444:
anonymous function does not always return a value
}, 

So the endless errors seem to come from Jquery itself. Not sure how to fix this (besides the obvious fixing every line it reports), but will look further into this.

Edit: Ok, like any good IDE where you can turn off warnings and show only errors (which isn't to say you got to ignore warnings. They're there for a reason), you can turn them off in Firefox too.

In the URL bar, type in about:config. In the filter field, type in javascript. One of the options shown, should be something like javascript.options.strict. Set it to FALSE and you're done. The endless list of warnings is gone. Let's just hope the Jquery folks'll fix it someday.

| improve this answer | |
  • Raf, did you then have the same issue as me and this was your fix? – Scott Aug 5 '11 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.