CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 166 forks source link

register_rest_route #3619

Open pkrick opened 3 years ago

pkrick commented 3 years ago

I get this Notice on the WooCommerce page in the backend

What Version Of Caldera Forms, WordPress and PHP Are You Using?

WordPress Version: 5.5.1PHP Version: 7.3.21MySQL Version: 5.7.27Caldera Forms Version: 1.9.2WP_DEBUG: 1

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

No

What Is The Unexpected Behaviour?

wurde fehlerhaft aufgerufen. Der Definition der REST-API-Route für cf-api/v2/entries fehlt das erforderliche Argument permission_callback. Für REST-API-Routen, die für öffentlichen Zugriff gedacht sind, benutze __return_true als Berechtigungs-Callback. Weitere Informationen: Debugging in WordPress (engl.) (Diese Meldung wurde in Version 5.5.0 hinzugefügt.) in /html/wordpress-kandel/wp-includes/functions.php on line 5225

Notice: register_rest_route wurde fehlerhaft aufgerufen. Der Definition der REST-API-Route für cf-api/v2/forms fehlt das erforderliche Argument permission_callback. Für REST-API-Routen, die für öffentlichen Zugriff gedacht sind, benutze __return_true als Berechtigungs-Callback. Weitere Informationen: Debugging in WordPress (engl.) (Diese Meldung wurde in Version 5.5.0 hinzugefügt.) in /html/wordpress-kandel/wp-includes/functions.php on line 5225

seanconklin commented 3 years ago

I'm seeing this as well in an XAMPP environment with Apache, PHP v7.4.10. Caldera Forms 1.9.2. WordPress 5.5.1 running Storefront theme.

PHP Notice:  register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>cf-api/v2/entries</code> is missing the required <code>permission_callback</code> argument.
PHP Notice:  register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>cf-api/v2/forms</code> is missing the required <code>permission_callback</code> argument.
strarsis commented 3 years ago

+1, with PHP 7.4. It may even cause more issues with PHP 8.

tripeh commented 3 years ago

+1

strarsis commented 3 years ago

Any plans to fix this in the near future?

negru13 commented 3 years ago

Can you please fix this? Other plugin devs have fixed their REST API errors.

Notice: register_rest_route was called incorrectly. The REST API route definition for <code>cf-api/v2/entries</code> is missing the required <code>permission_callback</code> argument.

deputt commented 3 years ago

I wonder if it is a missing permissions_callback in line 52 of caldera-forms/classes/api/forms.php

register_rest_route($namespace, $this->id_endpoint_url(), array_values( $id_route ),true );

jdtechdoc commented 3 years ago

I wonder if this plugin is still maintained, anyway? 900+ issues and hardly any meaningful replies (if any). Yes, this one creates only a notice, but there are lots of other boring bugs or shortcomings.