[wp-hackers] Direct requests for a page generate error
Richard K Miller
richardkmiller at gmail.com
Wed Oct 4 20:00:12 GMT 2006
Hi, this is my first post to the WP Hackers list, though I've used
WordPress for a long time. Thanks for an awesome product.
I run FreeMacWare.com and a few sister sites, all powered by
WordPress. I've had to make a small change to the source to meet our
needs, and I wonder if the change ought to be incorporated into the
WP trunk. I'm hoping you can help me understand whether or not this
issue is a bug.
On line 130 of wordpress/trunk/wp-includes/classes.php, you'll find
this:
if ( isset($perma_query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-
admin/') )
For our needs I've had to change it to this:
if ( isset($perma_query_vars) )
To my understanding, $perma_query_vars should be unset no matter
whether it's a wp-admin/ request or not. This would seem to make it
consistent with lines 124 and 127 as well.
Here are the symptoms:
* With a permalink structure of /%postname%/, accessing
www.example.com/wp-atom.php DOES NOT return any results.
* With any other permalink structure or none at all, accessing
www.example.com/wp-atom.php DOES return results.
I can give specific details about my case if necessary, but I thought
I'd open this for discussion first. (Is that the right way to go
about this? Should I provide a patch?)
Best regards,
Richard
More information about the wp-hackers
mailing list