Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40561
    kojaa
    Participant

    Since 5.5 WP update, debug.log is constantly being spammed with notice that is caused by this plugin.

    PHP Notice: register_rest_route was called incorrectly. The REST API route definition for post-views-counter/update-post-views 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 \wp-includes\functions.php on line 5225

    Please fix this.

    #40983
    ivitae
    Participant

    I am having the same issue, is there any update ?

    #41142
    rpb1001
    Participant

    This is the error:

    Notice: register_rest_route was called incorrectly. The REST API route definition for post-views-counter/view-post 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 /Applications/MAMP/htdocs/…/wp-includes/functions.php on line 5225

    Notice: register_rest_route was called incorrectly. The REST API route definition for post-views-counter/update-post-views 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 /Applications/MAMP/htdocs/…/wp-includes/functions.php on line 5225
    Add New Page

    #41506
    Hadom
    Participant

    Notice: Функция register_rest_route вызвана неправильно. В определении маршрута REST API для post-views-counter/view-post отсутствует обязательный аргумент permission_callback. Для общедоступных маршрутов REST API используйте __return_true для разрешения обратного вызова. Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 5.5.0.) in /functions.php on line 5225

    Notice: Функция register_rest_route вызвана неправильно. В определении маршрута REST API для post-views-counter/update-post-views отсутствует обязательный аргумент permission_callback. Для общедоступных маршрутов REST API используйте __return_true для разрешения обратного вызова. Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 5.5.0.) in /functions.php on line 5225

    #41552
    McManuel
    Participant

    Hey folks !

    The problem is in includes/counter.php l.748
    They forgot to add a permission_callback in register_rest_route params

    register_rest_route( 'post-views-counter', '/view-post/', array(
    			'methods'	 => array( 'GET', 'POST' ),
    			'callback'	 => array( $this, 'check_post_rest_api' ),
    			'args'		 => array(
    				'id' => array(
    					'default'			 => 0,
    					'sanitize_callback'	 => 'absint'
    				)
    			),
                'permission_callback' => true,
    ) );

    Same issue in includes/columns.php

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.