WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Plugin causes pageid access redirect loop and xml front page (2 posts)

  1. anmari
    Member
    Posted 5 years ago #

    Hi there,
    A plugin I am working on suddenly "broke" the non admin part of wordpress - Midway through changing some minor code and retesting (setting some global variables for common translation strings rather than calling __ each time).

    The plugin has nothing to do with redirection.
    Apache log shows lots of 302's? on any page id
    127.0.0.1 - - [31/Aug/2008:09:34:46 +1000] "GET /wptest/?page_id=160 HTTP/1.1" 302 -
    Admin works fine, but any other access causes either:
    1) - using index.php
    <response>
    <error>1</error>
    <message>I really need an ID for this to work.</message>
    </response>

    2) - using page id
    Redirect Loop
    Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked. etc

    The only place I found message 1 was something to do with trackbacks??

    I am on a windows apache server. I had not changed the config. I have checked it is not theme dependent. I disabled all other plugins and it is this one that I am developing. Same problem occurs on Linux test server.

    The plugin is filtering content to return an event list from an ical link (links are local for now & cached)and was 99% there, just doing final testing and a few minor bits.

    Can anyone help with some ideas of what the problem may be or how to isolate it? - I am coming down to having to slowly reimplement bits of code until it "breaks" wordpress again - painful - I thought I'd be done by now.

    Oh and http://planetozh.com/blog/my-projects/wordpress-hooks-filter-flow/ script also causes the XML "I need an ID" message

  2. anmari
    Member
    Posted 5 years ago #

    Oh I feel really stupid now....

    Don't set a value to a global variable called $tb !!!

    (Yes that's right, I idly thought I'd allow the option to generate tight or verbose html code, and while all my other variable names have been nicely isolated from anything wordpress might be using, for some reason I let this one sneak in)

    I should know better.... I guess the real lesson is don't make code changes late at night.... and don't spend too much time debugging when you are tired. How many times does one have to learn that?

    Anyway at least the effect and the cause are on the record for others who may do a similar such silly thing!

    Now I am going to have my morning coffee...

Topic Closed

This topic has been closed to new replies.

About this Topic