Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

#223 closed defect (bug) (fixed)

Member theme failing to import css in r653

Reported by: burtadsit's profile burtadsit Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords:
Cc:

Description

I don't know when before that it was introduced but the member theme is not loading anything other than 'style.css'. None of the component css files are being sent to the browser.

[10-Dec-2008 21:05:18] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'C:\wamp\www\wp-content\member-themes\buddypress-member\css/wp-load.php' (include_path='.;C:\php5\pear') in C:\wamp\www\wp-content\member-themes\buddypress-member\css\loader.php on line 4

That is the php error log entry.

In previous revs ../css/loader.php looked like this:

/* Load the WP environment */
require_once( dirname( dirname( dirname( dirname( dirname ( FILE ) ) ) ) ) . '/wp-load.php' );

Latest rev looks like this:

/* Load the WP environment */
require_once( preg_replace('/(.*)\/wp-content\/.*/', '\1', dirname( FILE ) ) . '/wp-load.php' );

The regex is coming up with 'current directory'/wp-load.php

I haven't debugged it further than this at the moment.

Attachments (1)

loader.php_for_win_n_linux.patch (495 bytes) - added by burtadsit 16 years ago.
patch to loader.php in member css dir for windows and linux file names

Download all attachments as: .zip

Change History (5)

#1 @burtadsit
16 years ago

See the forums for what led to this:

http://buddypress.org/forums/topic.php?id=358

#2 @burtadsit
16 years ago

I upgraded my live server to wpmu 2.7 and the latest rev of bp. It works just fine on linux. Look at the error msg. Notice the backslashes? The dev server is on windows. The regex is returning FILE because it can't match anything before '/wp-content/' because it's actually '\wp-content'.

This only fails on windows.

#3 @burtadsit
16 years ago

Attached is a patch for loader.php that works for both windows and linux. I changed the regex to work with both.

@burtadsit
16 years ago

patch to loader.php in member css dir for windows and linux file names

#4 @apeatling
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.