Colin Helvensteijn
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Rewrite rules messed up after page editWordPress has changed the way it handles request recently. In WP 1.5, all rewrite rules were stored in the .htaccess file. WP 2.2 (I’m not exactly sure when they changed this) has a simple rewrite rule in its .htaccess file that rewrites every request to a non-existing physical file to index.php, and then uses the rewrite rules from the database to determine what to do with the request.
So when anyone requests a page from your site, Apache will try to find a physical file matching the request, and if it can’t, it rewrites the request to WP’s index.php, and WP uses the original request URI (which it gets from Apache) to try to find any matches, and if it can’t, it’ll throw a 404 at you.
So these rewrite rules in the database are for some reason messed up when posting or editing a page, causing WP to be unable to find any match for any request whatsoever, and thus always spits out a 404.
I’m not exatly sure why WP still tries to recontruct the .htaccess file everytime I post or edit a page, because since all those rewrite rules are now in the database, it is no longer nessecary.
Forum: Fixing WordPress
In reply to: Rewrite rules messed up after page editHi Dreamshop
Well, at least it’s good to know I’m not the only one with this problem. Then again, makes it all the more curious why I just can’t seem to find anything about it. Tried these forums, tried Google, nothing.
I could perhaps accept it if it was only me, but if you have the same problem, it stands to reason we’re not the only ones. So why can’t I just find anyting?
Forum: Fixing WordPress
In reply to: Rewrite rules messed up after page editI’m not sure, but I think it has to do with the fact that my WP files are in another directory than the index.php file (index.php is in the site root, WP files are in /wp).
I noticed that when I post an article in my blog, “Site admin” links, “Edit post/comment” links and the likes point to /wp-admin/ whereas they should point to /wp/wp-admin/.
So if WP indeed thinks that its files are in the siteroot when posting, it kinda figures that it messes up those rewrite rules when posting/editing a page, becase it seems only then it recreates them.
Am I making any sense? Is anyone reading this at all? I’d still appreciate some help here…
Forum: Fixing WordPress
In reply to: Different fontsThere’s a
<code>
tag in you post “Testpost” that isn’t closed. Makes browsers think that everything coming after it is code so they apply monospaced font to it when nothing else is specified by the stylesheet. Remove that tag from your post or close it properly.Forum: Fixing WordPress
In reply to: Forbidden: wp-admin/index-extra.phpLooks like something went wrong with the file permissions while uploading.
Use your FTP client to change the permissions of all WP related files and folders to something like 755 (rwxr-xr-x) and use the option to apply that recusively so that subdirectories and files therein are also set with those permissions.
The second error message means there’s a misconfiguration Apache’s config file. It can’t find the file it tries to load when it issues a 404 error.
Forum: Developing with WordPress
In reply to: .htaccessHave a look at your Apache config file (usually called httpd.conf, should be somewhere inside the directory where you installed XAMPP). Find the list of modules to be loaded and check if mod_rewrite isn’t commented out. If so, uncomment it. save and restart Apache.
Forum: Fixing WordPress
In reply to: How to post to another category and not display in default categoryIs the ‘Beginner Invsting’ perhaps a child category of ‘Online Trading’? In that case, all posts belonging to the first category will automatically also belong to the second, for obvious reasons.
Forum: Fixing WordPress
In reply to: Rewrite rules messed up after page editI’ve done some more DB digging and found two other rows in the options table: page_attachment_uris and page_uris. They’re in the same format as rewrite_rules, but a lot shorter. As said before, I’m pretty confident that WP uses all that gibberish to contruct regular expressions with which in turn will yield the requested post/page/whatever (so long as those rewrite rules aren’t messed up). What those page_attachment_uris and page_uris tables do exactly, I’m not sure, as the same information already seems to be in the rewrite_rules row.
What I still haven’t figured out is what exactly goes wrong, other than the fact that those rewrite rules get screwed on every page edit.
I’ve also begun going through the core of WP, to find out what exactly it does when writing/editing pages and where it could go wrong, but it’s fairly more complex than any PHP code I’ve ever written and it takes some time to even make heads or tails of it.
So, any help would still be very, very welcome, because as it looks now, I don’t think I’m going to find the problem myself anytime soon, let alone fix it.
P.S. Perhaps the output of phpinfo() could be useful to anyone looking at this problem.
Forum: Fixing WordPress
In reply to: How do I get the link description to show in blogroll?wp_list_bookmarks('category_name=Friends'); wp_list_bookmarks('category_name=Heroes'); wp_list_bookmarks('category_name=Tools');
Something like that, each on its own page?