aamplugin / advanced-access-manager

WordPress Advanced Access Manager Plugin
Other
30 stars 14 forks source link

URL Access feature does not save "Redirect to page" #339

Closed aamplugin closed 7 months ago

aamplugin commented 8 months ago

When trying to setup URL Access I encountered the following issue: If I select "Redirect to an existing page" and select the page I want, I get an error when saving, because the page id is send as an integer, while the backend expects a string.

See the following response from the save request:

{
    "code": "rest_invalid_param",
    "message": "Invalid parameter(s): redirect_page_id",
    "data": {
        "status": 400,
        "params": {
            "redirect_page_id": "redirect_page_id is not of type string."
        },
        "details": {
            "redirect_page_id": {
                "code": "rest_invalid_type",
                "message": "redirect_page_id is not of type string.",
                "data": {
                    "param": "redirect_page_id"
                }
            }
        }
    }
}