#2613 closed defect (bug) (invalid)
Not a bug: bbPress 2.5.4 fails to load bbpress.css and editor.js
Reported by: | Neosnc | Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | trivial | Version: | 2.5.4 |
Component: | Tools - Code Improvements | Keywords: | |
Cc: |
Description
On Windows depending on your path, bbPress 2.5.4 fails to load it's css or editor.js. The problem stems from the path being returned with two breaking the $content_dir value for windows.
This is relevant to a recent fix (ticket 2518) updating $content_dir to use WP_CONTENT_DIR. Ticket 2518 corrects for unix style paths but not Windows paths.
I posted about this issue in the forums in May but it looks like it didn't make it into this 2.5.4 version. http://bbpress.org/forums/topic/wp-3-9-1-not-loading-any-bbp-2-5-3-styles/
Error:
Chrome console error shows
GET http://localhost/wp-at/wordpressC:/ProgramFiles/wamp/www/wp-at/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5.4-5380 403 (Forbidden) localhost/:28
GET http://localhost/wp-at/wordpressC:/ProgramFiles/wamp/www/wp-at/wp-content/plugins/bbpress/templates/default/js/editor.js?ver=2.5.4-5380 403 (Forbidden)
How to reproduce:
Install WordPress and bbPress on Windows in the Windows Program Files folder.
Solution:
Line 168 & 237 of template-functions.php added this to correct for double Windows path slashes:
$content_dir = str_replace( '', '/', $content_dir );
Attachments (1)
Change History (5)
#1
@
10 years ago
Neosnc, thanks for the ticket and patch though I cannot reproduce your issue.
Per the screenshot here I replicated your environment installing WordPress 3.9.1 and bbPress 2.5.4 C:\ProgramData\wamp\www\wp-at\
using XAMPP and everything appears fine.
How do you have your Apache virtual host configured?
Windows \\
back slashes are already replaced with a /
forward slash at #L161 and #L231
Essentially your patch is replacing two forward slashes //
with a single forward slash /
so I am thinking somewhere in your configuration you have an extra /
that is not required.
#2
@
10 years ago
- Keywords close added; has-patch removed
- Milestone Awaiting Review deleted
- Priority changed from high to lowest
- Resolution set to invalid
- Severity changed from normal to trivial
- Status changed from new to closed
- Summary changed from bbPress 2.5.4 fails to load bbpress.css and editor.js to Not a bug: bbPress 2.5.4 fails to load bbpress.css and editor.js
Netweb, ahh it looks like you are correct.
My apache document root was DocumentRoot "C:/Program Files/wamp/www/" and <Directory "C:/Program Files/wamp/www/">
Taking off the trailing slash does work with bbPress.css and editor.js loading correctly. Apache was working to serve pages so I guess I hadn't noticed that it was misconfigured.
Sorry for the false alarm, thanks for taking a look and testing the issue. I'll try to update the ticket to not a bug.
Windows path fix for bbpress.css and editor.js