17487 Posts in 4473 Topics by 1978 members
|Go to End|
6 June 2008 at 11:15am
Amongst a few other problems that I'm having, some of the admin pages are giving me 404 page not found errors. For example, clicking on uploads (or the main site right above it) causes this. The server log says:
[05/Jun/2008:18:56:59 -0400] "POST /admin/comments/showtable/unmoderated&ajax=1 HTTP/1.1" 404
(with the irrelevant bits removed)
Other pages that do this are:
- clicking on the uploads tab in Files & images
- Clicking on "awaiting moderation" in the comments page (or any other item in the list on the left side of the page
Any ideas on what is causing this? I've searched through the forums here but haven't found any solutions.
11 June 2008 at 12:03am
Just letting you all know that I finally figured out what was causing the problem. The Silverstripe CMS' main entry file, sapphire/main.php, has the following in line 149:
$baseURL = dirname(dirname($_SERVER['SCRIPT_NAME']));
On the server that I'm using, this is supposed to return "/", because that is the base at which I installed the CMS. However, with longer URLs, (e.g., sub-pages within security, assets, comments and blog links such as tags and archives), it appends the base directory of that page to $BaseURL. For example, the URL "blog/tags/Google" will set $baseURL to "/blog" instead of "/". As a result, it fails to find the appropriate files, and returns an error.
I have hard-voded $baseURL = '/'; for now.
BTW, the provider that I'm using is kiwihosting.org.nz. I'll add them to the list of providers that Silverstripe can be installed on, with instructions on how to do it, later.
24 June 2008 at 1:06am Last edited: 24 June 2008 3:31am
There are some additional problems. *Sigh*
The upload images section still wasn't working. For some reason, Silverstripe would prepend admin/assets/ to the submit URLs (amongst others), resulting once again in 404 errors. A URL might end up looking like:
If anyone has any idea as to why, please let me know. For now, I've added the following rules to the .htaccess file:
RewriteRule (.*)/sapphire/(.*) /sapphire/$2 [L]
RewriteRule (.*)/jsparty/(.*) /jsparty/$2 [L]
RewriteRule (.*)/cms/(.*) /cms/$2 [L]
RewriteRule /admin/assets/admin/assets/(.*) /admin/assets/$1 [L]
I might need to add one or two more, as I also get the odd page-save error too.
8 July 2008 at 1:47pm
I've solved tha last few problems, and posted installation instructions here.
|Go to Top|