#3869 closed defect (bug) (worksforme)
WP-DB Error Message -- CSS / image not loading when installed in subdir
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | minor | Version: | 2.1.1 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
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)
Change History (12)
#2
@
19 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)
#4
@
19 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.
#6
@
19 years ago
We could require() the CSS into the <head> element. I believe we still have ABSPATH, so it should be no problem.
#9
@
19 years ago
- Keywords has-patch added; needs-patch removed
Patch (partial?) which fixes this issue if WP_SITEURL is defined attached.
Is it possible for this to work based on the value of
ABSPATH?