Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enqueue jQuery in the header #1445

Closed
wants to merge 1 commit into from
Closed

Enqueue jQuery in the header #1445

wants to merge 1 commit into from

Conversation

CoryCharlton
Copy link

Make sure that jQuery is enqueued in the header to resolve #1223

Make sure that jQuery is enqueued in the header to resolve #1223
@georgestephanis
Copy link
Member

Hrm. I'd sooner see enqueueing it as a dependency properly, but we'll see if this way is required. Need further investigation internally first.

@CoryCharlton
Copy link
Author

There may be a more elegant solution but I couldn't locate it. The problem only began after I disabled several Jetpack modules I wasn't using (Beautiful Math, Gravatar Hovercards, JSON API, and Shortcode Embeds). Prior to disabling these modules jQuery was getting loaded in the head and the inline javascript in the footer from the sharedaddy module ran fine.

@georgestephanis
Copy link
Member

Are you using any other plugins? What version of Jetpack are you running? It's possible that something is glitching.

@CoryCharlton
Copy link
Author

Jetpack 3.3. Other active plugins: Akismet 3.0.4, BackUpWordPress 3.0.4, Disqus Comment System 2.84, Use Google Libraries 1.6.2, WordPress SEO 1.7.1, WP Crontrol 1.2.3, WP Super Cache 1.4.2.

I rolled my change back to the original implementation on my sandbox site and verified the problem existed (jQuery in the footer below the inline sharedaddy javascript). Then I re-enabled the Jetpack modules I turned off today. With either Gravatar Hovercards or Shortcode Embeds enabled jQuery gets loaded in the head.

Edit: Forgot to mention that I also tried disabling the other plugins with the aforementioned Jetpack modules disabled and jQuery was still loaded in the footer so I'm not sure it's a plugin conflict.

@jeherve jeherve added [Feature] Sharing Post sharing, sharing buttons [Type] Bug When a feature is broken and / or not performing as intended labels Dec 19, 2014
@jeherve jeherve added this to the 3.4 milestone Dec 19, 2014
@samhotchkiss
Copy link
Contributor

@georgestephanis, what would you like to do on this?

@samhotchkiss samhotchkiss modified the milestones: 3.4, 3.5 Jan 28, 2015
@samhotchkiss samhotchkiss added the [Status] Needs Review This PR is ready for review. label Apr 13, 2015
@samhotchkiss samhotchkiss modified the milestones: 3.6, 3.5.1 Apr 23, 2015
@georgestephanis
Copy link
Member

I'll take a look tomorrow to see what's causing jQuery to not be loaded -- or rather what script is expecting it but not getting it.

@georgestephanis
Copy link
Member

I'm closing this, as we took a different swing at it in #1666 which got merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Sharing Post sharing, sharing buttons [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling sharing_add_footer after (!) wp_print_footer_scripts in wp_footer to ensure jQuery dependancy
4 participants