Skip to:
Content

Opened 15 months ago

Closed 15 months ago

Last modified 14 months ago

#7694 closed defect (bug) (fixed)

Minified assets not enqueued when in child theme

Reported by: pscolv Owned by: 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 15 months ago.
js_loading_issue.png (53.9 KB) - added by pscolv 15 months ago.

Download all attachments as: .zip

Change History (8)

@pscolv
15 months ago

#1 @pscolv
15 months 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
15 months 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
15 months ago

  • Milestone changed from Under Consideration to 3.0

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

#4 @djpaul
15 months 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
14 months ago

In 11897:

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

Fixes #7694

Props pscolv

#6 @djpaul
14 months 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.