• I’ve created an options page for my plugin which is working brilliantly. It has a form which submits back to itself without any issues at all.

    Submitting a POST request works as expected, but if I try to submit a GET request to the same page I get a permission error:
    “You do not have sufficient permissions to access this page.”
    The URL that’s appearing for the get request is:

    https://localhost/wp-admin/options-general.php?page=my-plugin.php/my_plugin.php?action=trash&id=1

    Should I be able to submit a GET request to an admin page without error? I know about nonce, but it isn’t required is it?

    Cheers
    Rich

Viewing 1 replies (of 1 total)
  • Thread Starter huggie

    (@huggie)

    This can be ignored now, I realised what the issue was.

    ?page=my-plugin/my_plugin.php was already being passed as a parameter to options-general.php so instead of adding ?action=trash I should have been adding &action=trash

    Rich

Viewing 1 replies (of 1 total)
  • The topic ‘Error when using GET on admin page’ is closed to new replies.