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.
Hi,
I found a bug, jQuery Update doesn't work at page front (at least when you have one page-front.tpl.php).
This post talked about a replacement pattern, but it didn't work for me.
http://drupal.org/node/813918
is there any solution?
thanks
Comments
Comment #1
whayes CreditAttribution: whayes commentedCould be this - http://drupal.org/node/797442 I had a problem with jQuery not loading and this took care of it (Comment #1)
Comment #2
beckyjohnson CreditAttribution: beckyjohnson commentedI am having this problem too. I'm pretty at a loss as to what to do.
Comment #3
stackpr CreditAttribution: stackpr commentedCould be #893354: using drupal_get_js() inside tpl file breaks jquery_update. Do you call drupal_get_js() at any point in your front template or in your theme's template.php file?
Comment #4
beckyjohnson CreditAttribution: beckyjohnson commentedI don't. I declare a js file in my .info file....
Comment #5
stackpr CreditAttribution: stackpr commentedIs there anything distinctive about your front page or is it just a node with a custom page template? If it uses panels or views, do other panels/views work correctly? Just to confirm, your problem is that the misc/jquery.js is included -- not that no scripts are included?
Comment #6
beckyjohnson CreditAttribution: beckyjohnson commentedMy front page is just a template file. with some custom html in it. I had to custom code the quick tabs on the front page. Also the rotating book covers are generated because I printed out a block in my template. http://industryeducation.right-brain.net/
Elements like this and the drop down menu at the top do not break inside the site....
Becky
Comment #7
stackpr CreditAttribution: stackpr commentedThe recommended reading page (http://industryeducation.right-brain.net/rr/recommended-reading-developers) still shows misc/jquery.js, so the jquery_update does not seem to affect any page. Does that mean you have the module turned off right now?
Do you have a hook_preprocess_page() function with your theme? Does it interact with $scripts or with drupal_get_js()?
Comment #8
beckyjohnson CreditAttribution: beckyjohnson commentedI do. i have this:
It does not interact with drupal_get_js or $scripts though. Just posting it here for reference.
Comment #9
stackpr CreditAttribution: stackpr commentedThat looks fine (at least related to this). Do you have any pages where misc/jquery.js is actually being replaced? If so, can you link to that page too? Right now, it just looks like the module is just disabled sitewide (or is turned off via throttle?), but you suggest that the problem was only your front page. Perhaps you can add an HTTP header in jquery_update_preprocess_page() just to confirm that the function is actually being called? And if it is not being called, then perhaps you could add debug in the template to see whether the function even exists (i.e., whether the module was loaded).
Comment #10
beckyjohnson CreditAttribution: beckyjohnson commentedThat sounds like a good idea How do i add an HTTP header ? (I had to disable jquery update temporarily, boss's orders ).
Comment #11
stackpr CreditAttribution: stackpr commentedIn Drupal, you'll usually use: http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_se...
drupal_set_header("x-breakpoint-a: Yes");
The direct PHP function is
header()
.Comment #12
markhalliwellDrupal 6 reached EOL (end-of-life) on February 24, 2016.