CalderaWP / Caldera-Forms

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

No entries displayed with caldera_forms_entry_viewer-shortcode and 404 on call to REST API #3571

Closed perikorese closed 4 years ago

perikorese commented 4 years ago

I try to use the frontend shortcode for viewing entries, but I get "No Entries To Display". There are entries on the form.

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

WordPress Version: 5.4.2 PHP Version: 7.3.5 MySQL Version: 5.7.28 Caldera Forms Version: 1.9.1 WP_DEBUG:

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

Yes.

What Is The Unexpected Behaviour?

On a page in the frontend, I insert this shortcode: [caldera_forms_entry_viewer id="CF5ef5eb6a8ae49"] I expect to see the entries that the form has. But instead of entries I get this message: "No Entries To Display"

What PHP Errors Have You Logged While Reproducing This Bug?

No errors.

What JavaScript Errors Have You Seen While Reproducing This Bug?

I see that there is a call to the REST API, which results in a 404. Screenshot attached. I get this on a local dev site and also on a non-local staging site. Skærmbillede fra 2020-06-26 14-48-13

I am logged in as administrator when viewing the page. Caldera Forms is the only plugin installed. The theme is "Twenty Twenty".

Shelob9 commented 4 years ago

I don't know why this is happening, but the request is being made to /wp-json/cf-api/v2/forms/<form-id> which is not a route that exists. It should be making a request to /wp-json/cf-api/v2/entries/<form-id>

riverBanjo commented 4 years ago

https://desk.zoho.com/support/saturdaydriveinc/ShowHomePage.do#Cases/dv/413570000004636140

Shelob9 commented 4 years ago

@Shelob9 RE: https://github.com/CalderaWP/Caldera-Forms/issues/3571#issuecomment-652026360

ACTUALLY, the requests are correct. /wp-json/cf-api/v2/forms/<form-id> should be requested, it is not registed, that is the actual bug.

CF 1.9.0 registered a POST endpoint on the same route as that GET request, which is probably the problem here.

Shelob9 commented 4 years ago

Should be resolved via #3576

New0 commented 4 years ago

Closed via https://github.com/CalderaWP/Caldera-Forms/commit/9849137d9741ff5931c9464c2589044cd8fd51c7