Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7694 closed defect (bug) (fixed)

Minified assets not enqueued when in child theme

Reported by: pscolv's profile pscolv Owned by: djpaul's profile djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.3
Component: Templates Keywords:
Cc:

Description

I'm using my own buddypress.js and buddypress.css files within my child theme. Unfortunately, when trying to minify those, I noticed that the original file was still being enqueued. This behaviour differs from the bp-legacy folder, where the minified file is chosen by default.

When digging into the code, I noticed that the buddypress-functions.php indeed doesn't try and look for minified assets in child themes.

This can be fixed easily in the locate_asset_in_stack function. I already modified the code and tested accordingly (see attached patch). With this new code, either minified or un-minified child theme assets are loaded, depending which version exists.

Regards,

Pascal.

Attachments (2)

7694.patch (1.7 KB) - added by pscolv 7 years ago.
js_loading_issue.png (53.9 KB) - added by pscolv 7 years ago.

Download all attachments as: .zip

Change History (8)

@pscolv
7 years ago

#1 @pscolv
7 years ago

One remark though : when running the "ongoing" buddypress version from the SVN repository, I noticed that there are many issues related to js scripts loading (which occurred even without my buddypress-functions.php changes). I joined a snapshot of those here. Don't know for sure whether they are related to my install, but they don't seem to.

#2 @DJPaul
7 years ago

  • Milestone changed from Awaiting Review to Under Consideration

Hi @pscolv

Thanks for getting in contact. This looks like a good spot, and we'll have to take a look at this. Your patch is high quality, so with luck, we can just drop it in once we confirm the issue!

#3 @DJPaul
7 years ago

  • Milestone changed from Under Consideration to 3.0

Confirmed. Good patch - thanks so much @pscolv :)

#4 @djpaul
7 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11897:

Templates, Legacy: fix minified assets not enqueued when in child theme.

Fixes #7694

Props pscolv

#5 @djpaul
7 years ago

In 11897:

Templates, Legacy: fix minified assets not enqueued when in child theme.

Fixes #7694

Props pscolv

#6 @djpaul
7 years ago

In 11897:

Templates, Legacy: fix minified assets not enqueued when in child theme.

Fixes #7694

Props pscolv

Note: See TracTickets for help on using tickets.