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.
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.