Opened 15 years ago
Closed 15 years ago
#14052 closed defect (bug) (invalid)
File get http status 404 but is served !
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
I have recently upgraded my installation of wordpress from 2.9.2 to 3.0 and the only things that did not work was my archive plugin... After a few research, it appeared that the .js.php file included by the plugin in my page got a 404 status.
After triple checking, the file is here and in a good place, accessible by the src url of the javascript include.
I also noticed that even if the return code was 404, the file was served by apache.
I went chasing header function in the wordpress code and using my dearest friend : grep and diff.
A line was modified from 2.9.2 but not for the better...
Here is the patch that made thing working for me as I'm not familiar with Wordpress code, I'm not sure I did write. I checked but did not found any tickets that had some similarity with this one but my config is standard : apache 2.2.14 with php 5.3.2 (ubuntu flavor).
My patch revert the if statement to 2.9.2 it's maybe not the best way (if this condition was removed it's surely for a reason) but my file is no longer served with a 404 return code.
Attachments (1)
Change History (4)
#2
@
15 years ago
Well it's the better-extended-live-archive plugin. I didn't had a look right away but if you have a few minutes to spare..
Here is the link : http://wordpress.org/extend/plugins/better-extended-live-archive/
I will try to look if the nasty bits come out of here or not but don't know when :/
#3
@
15 years ago
- Milestone Unassigned deleted
- Resolution set to invalid
- Status changed from new to closed
The plugin is using wp-blog-header.php.
Use admin-ajax.php instead. http://codex.wordpress.org/AJAX_in_Plugins
How is the plugin including WordPress? by directly including 'wp-blog-header.php', 'wp-load.php' or 'wp-config.php'? Try wp-load instead.
Plugins should not be including WordPress directly by files in their plugin folder, this has the nasty effect of breaking on many servers.
All recomendations should be to use a wordpress entry point such as <homeurl>/?load-plugin-css or use admin-ajax/admin-post.php files (Both of which include non-user-logged-in hooks)