Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#6213 closed defect (bug) (fixed)

buddypress.css is never minified

Reported by: wpdennis Owned by: DJPaul
Priority: normal Milestone: 2.3
Component: Appearance - Template Pack Version:
Severity: major Keywords:
Cc:

Description

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 buddypress.org itself doesn't deliver the minified stylesheets.

Change History (5)

#1 @DJPaul
11 years ago

  • Milestone Awaiting ReviewUnder 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
11 years ago

  • Keywords dev-feedback removed
  • Milestone Under Consideration2.3
  • Severity normalmajor

#3 @r-a-y
11 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 11 years ago by r-a-y (previous) (diff)

#4 @DJPaul
11 years ago

  • Owner set to DJPaul
  • Status newassigned

#5 @djpaul
11 years ago

  • Resolutionfixed
  • Status assignedclosed

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.