WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Plugin Options Page Page Not Found on options form submit (4 posts)

  1. toneburst
    Member
    Posted 3 years ago #

    I'm getting an options page not found error when I submit the form for my plugins Options page.

    I've been following the code here:
    http://codex.wordpress.org/Creating_Options_Pages

    I'm a bit confused as to whether my options form should post to options.php (as in the example) with
    <form method="post" action="options.php">, or if I have to add the URL of my options page in here manually as the post action. If I leave the code as above, I get the not found error, but I'm wondering if some kind of automatic redirection should be going on which isn't happening.

    I can see the hidden fields have been added to the form if I check the source of the options page online, and the values for options_page and _wp_http_referer seem correct.

    Any advice much appreciated.

    a|x

  2. toneburst
    Member
    Posted 3 years ago #

    Anyone?

  3. toneburst
    Member
    Posted 3 years ago #

    Is there anything in addition to the steps outlined in this
    http://codex.wordpress.org/Creating_Options_Pages
    document that I need to do, in order to get my options page to work?

    I'm still getting the 'options page not found' error when I click the Save Changes button.

    Also, should the values for the automatically-generated hidden form fields 'options_page' and 'http_referer' match? In my case, they don't- the value of 'options_page' is actually the value of my settings group, as used as the first value passed to the 'register_setting()' function. This seems counter-intuitive, as I'd have thought the value of this field would be the page-reference for the admin page for my plugin.

    Any tips very much appreciated,

    Thanks guys,

    a|x

  4. toneburst
    Member
    Posted 3 years ago #

    Solved. I was calling my function to register the plugin settings in the wrong place.

Topic Closed

This topic has been closed to new replies.

About this Topic