Skip to:

Opened 9 years ago

Closed 9 years ago

#6213 closed defect (bug) (fixed)

buddypress.css is never minified

Reported by: wpdennis's profile wpdennis Owned by: djpaul's profile DJPaul
Milestone: 2.3 Priority: normal
Severity: major Version:
Component: Appearance - Template Pack Keywords:


in enqueue_styles() it checks, whether the minified version should be included:

$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

But in locate_asset_in_stack() the ".min" will always be stripped, e.g.:

$locations['bp-legacy'] = array(
    'dir'  => bp_get_theme_compat_dir(),
    'uri'  => bp_get_theme_compat_url(),
    'file' => str_replace( '.min', '', $file )

I don't think the str_replace should be there, should it? Even itself doesn't deliver the minified stylesheets.

Change History (5)

#1 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to Under Consideration

Erm. @r-a-y can you remember what the .min fix was for? I know you fixed something I broke when we introduced Grunt.

#2 @DJPaul
9 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Under Consideration to 2.3
  • Severity changed from normal to major

#3 @r-a-y
9 years ago

Paul, see #5888.

I believe the goal was to allow bp-legacy's stylesheet to continue being minified. Though, if a theme was overriding buddypress.css, we do not look for the minified asset since not all themes will minify their CSS, which was causing the original issue in #5888.

Update: Looks like Dennis is referring to r9092 (see #5963).

We should probably revert r9092 or look for a better fix.

Last edited 9 years ago by r-a-y (previous) (diff)

#4 @DJPaul
9 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#5 @djpaul
9 years ago

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

In 9630:

BP-Legacy: load minified CSS/JS in all builds except src.

Problem was introduced in r9092 which was an attempt to not load minified assets for the src build.
This had the unfortunate consequence of not loading the minified assets, anywhere.

Fixes #6213

Note: See TracTickets for help on using tickets.