2

I have a situation where I am calling get_queried_object() in the 'wp' action hook and it is causing an infinite 301 redirect.

I can temporarily fix this by adding:

remove_filter( 'template_redirect', 'redirect_canonical' );

but I know this is a temporary fix because this disabled the auto redirect 404 errors.

http://www.mydigitallife.info/how-to-disable-wordpress-canonical-url-or-permalink-auto-redirect/

http://docs.dev4press.com/tutorial/wordpress/canonical-redirect-problem-and-solutions/

The error seems to be server specific though because I've not seen it on dozens of other. And even stranger, caching prevents the issue from occurring when not logged in (using W3 Total Cache)

2012 theme activated and all other plugins are deactivated except the one calling get_queried_object.

I also discovered that this was only an issue on the client's homepage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.