Notice: register_rest_route was called incorrectly

Ask New Question
  • Notice: register_rest_route was called incorrectly

    Suddenly I got this error when clicked on the Add New Post link.

    Notice: register_rest_route was called incorrectly. The REST API route definition for wpra/v1/templates(?:/(?P[^/]+))? is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in ***/functions.php on line 5225

    Please help, How do I fix this?

2 Replies Reply
  • Author
  • |  

    You should update the WordPress and all installed plugins. Logout clear cache and then try to open it again.

    Another reason that it could be due to some cache plugin. So try clearing cache of the cache plugin. I faced the same issue on one of my website and I fixed it using the above procedure. Hopefully it will work for you.

    + 0

    Please also make sure that debug mode is not on. You can disable it in the config.php file.

    define( 'WP_DEBUG', true );


    + 0
Viewing 2 replies - 1 through 2 (of 2 total)
Reply To: Notice: register_rest_route was called incorrectly
Your information: