Skip to:
Content

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3047 closed defect (bug) (fixed)

jQuery not properly enqueued in all circumstances

Reported by: johnpbloch Owned by: johnpbloch
Milestone: 1.5 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

In the function bp_core_confirmation_js(), BuddyPress echoes inline javascript with jQuery directly to the <head> section without properly checking to make sure jQuery has been loaded. Since BuddyPress doesn't normally run without jQuery by default, this isn't generally a problem. However, if using the BP Template Pack, one has the option of turning off the default javascript and CSS. If you do that, the core confirmation script still runs without the jQuery dependency in place.

bp_core_confirmation_js() should be checking if jQuery has been loaded, and should load it if it hasn't been. I have a working patch which I'll attach momentarily.

Attachments (1)

3047.patch (666 bytes) - added by johnpbloch 3 years ago.
If jQuery hasn't been enqueued, do so. If it hasn't been printed, do so.

Download all attachments as: .zip

Change History (5)

johnpbloch3 years ago

If jQuery hasn't been enqueued, do so. If it hasn't been printed, do so.

comment:1 johnpbloch3 years ago

  • Keywords has-patch added
  • Owner set to johnpbloch
  • Status changed from new to assigned

comment:2 johnjamesjacoby3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4018]) Make sure jQuery is loaded in bp_core_confirmation_js(). This is primarily for themes that do not include jQuery independently. Fixes #3047. Props johnploch.

comment:3 johnjamesjacoby3 years ago

Props johnpbloch even.

comment:4 johnjamesjacoby3 years ago

  • Milestone changed from Awaiting Review to 1.5
  • Severity set to normal
  • Version 1.5 deleted

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.