Skip to:
Content

Opened 5 years ago

Closed 5 years ago

#223 closed defect (bug) (fixed)

Member theme failing to import css in r653

Reported by: 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 5 years ago.
patch to loader.php in member css dir for windows and linux file names

Download all attachments as: .zip

Change History (5)

comment:1 burtadsit5 years ago

See the forums for what led to this:

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

comment:2 burtadsit5 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.

comment:3 burtadsit5 years ago

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

burtadsit5 years ago

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

comment:4 apeatling5 years ago

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