API PATCH requests started failing with status code 500 after 2024-02-28

By: Ranjeet Singh | Asked: 03/22/2024
ForumsCategory: General questionsAPI PATCH requests started failing with status code 500 after 2024-02-28
Ranjeet Singh asked 1 month ago
I have a script that sends a PATCH request to update an entry when a task is marked complete in our project management system.  It was working for many months, but it looks like all PATCH requests sent after 2024-02-28 have been failing with status code 500.  The message being returned by the Formidable API is HTML, not the typical error messages I see from APIs. Was there something in the the v1.15 release that impacts this route?  I have the Formidable API plugin Version 1.15 and Formidable Pro Version 6.8.3. yoursite.com/wp-json/frm/v2/entries/# POST/PUT/PATCH Update entry by id. # = entry ID. Here\'s what I\'m seeing:
  • try any of these calls in Python:
param_result = requests.patch( url=\'https://mysite.mydomain.edu/wp-json/frm/v2/entries/36262\', auth=(key, \'\'), params={\'6bt2\': \'True\'})print(param_result.status_code)json_result = requests.patch( url=\'https://mysite.mydomain.edu/wp-json/frm/v2/entries/36262\', auth=(key, \'\'), json={\'6bt2\': \'True\'})print(json_result.status_code)data_result = requests.patch( url=\'https://mysite.mydomain.edu/wp-json/frm/v2/entries/36262\', auth=(key, \'\'), data={\'6bt2\': \'True\'})print(data_result.status_code)
  • Note the output with html message
b\'{\"code\":\"internal_server_error\",\"message\":\"<p>There has been a critical error on this website.<\\\\/p><p><a href=\\\\\"https:\\\\/\\\\/wordpress.org\\\\/documentation\\\\/article\\\\/faq-troubleshooting\\\\/\\\\\">Learn more about troubleshooting WordPress.<\\\\/a><\\\\/p>\",\"data\":{\"status\":500},\"additional_errors\":[]}\' Please note that POST and GET requests continue to work as expected.  This issue seems to be specific to PATCH and PUT.  The following code works, for example:
v_post = { \'item_key\': \'17kub\' , \'id\': \'36262\' , \'j8ouk\': \'1206584571307334\' , \'6bt2\': \'True\' , \'e9r7k\': \'\' , \'u7o30\': \'\' }put_result = requests.post( url=\'https://mysite.mydomain.edu/wp-json/frm/v2/entries/36262\', auth=(key, \'\'), data=v_post)

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community