Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3869 closed defect (bug) (worksforme)

WP-DB Error Message -- CSS / image not loading when installed in subdir

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.1.1
Component: General Keywords: has-patch
Focuses: Cc:


I have WordPress installed in a folder called wordpress, i.e. my files are not in my root.

When I have a database error (for example, when MySQL takes a crap), the page is totally unstyled. 99.9% sure it didn't used to be like this. It's looking for the CSS at wp-admin/install.css rather than wordpress/wp-admin/install.css.

I don't see why it shouldn't be possible to figure out where WordPress is installed relative to the current URL in order to get the stylesheet and image to show up right in most cases.

Attachments (1)

3869.diff (539 bytes) - added by Nazgul 15 years ago.

Download all attachments as: .zip

Change History (12)

#1 @JeremyVisser
15 years ago

Is it possible for this to work based on the value of ABSPATH?

#2 @markjaquith
15 years ago

Same goes for AYS prompts.

I think JeremyVisser is right... we should be able to use ABSPATH and $_SERVER['DOCUMENT_ROOT'] to figure out the siteurl (WP's URL)

#3 @ryan
15 years ago

get_home_path() might he helpful.

#4 @markjaquith
15 years ago

Tricky issue... $_SERVER['DOCUMENT_ROOT'] isn't reliable. Without DB access, there's no surefire way to determine the URL for the WP directory. At least not that I can see.

#5 @foolswisdom
15 years ago

  • Milestone changed from 2.1.3 to 2.2

#6 @rob1n
15 years ago

We could require() the CSS into the <head> element. I believe we still have ABSPATH, so it should be no problem.

#8 @foolswisdom
15 years ago

  • Milestone changed from 2.2 to 2.3

15 years ago

#9 @Nazgul
15 years ago

  • Keywords has-patch added; needs-patch removed

Patch (partial?) which fixes this issue if WP_SITEURL is defined attached.

#10 @Nazgul
15 years ago

  • Milestone 2.3 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Assuming fixed, as code now uses wp_die for this functionality.

Feel free to reopen if I'm incorrect.

#11 @DD32
15 years ago

Assuming fixed, as code now uses wp_die for this functionality.

Correct; the old die() message hadnt been updated to use the new admin css location.

Note: See TracTickets for help on using tickets.