Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5656

WP 5.5: register_rest_route was called incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Released
    • Icon: Should have Should have
    • 2.52.0
    • None
    • 5
    • Admin Panel

      The page editor is throwing some Notices:

      Notice:  register_rest_route was called incorrectly. The REST API route definition for plugin_blocks/v2/plugin_blocks_report is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/all-published-posts is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/save-preview-meta is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/get-spreadsheet-data is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/get-posts is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/get-happypoint-data is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for planet4/v1/get-gallery-images is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for wp/v2/posts/(?P<id>[0-9]+)/related is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for elasticpress/v1/pointer_search is missing the required permission_callback argument. 
      Notice:  register_rest_route was called incorrectly. The REST API route definition for elasticpress/v1/pointer_preview is missing the required permission_callback argument. 
      

      register_rest_route() now asks for a "permission_callback" at all time. before this, "permission_callback" returned true by default, so we could just set it as "__return_true" (see https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/#permissions-callback)

      Some of those notices are not from our code, so we should also check if more recent version of elasticpress still has this problem.

      Check also with GPCH for their plugins

            pvincent Pieter Vincent (Inactive)
            fhernand Florent Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: