cf7-to-api icon indicating copy to clipboard operation
cf7-to-api copied to clipboard

Save error with latest CF7 and feature request

Open ats-org opened this issue 3 years ago • 2 comments

Greetings,

There seems to be an issue with the latest CF& and being able to update, others have rolled back to resolve the issue but unfortunately, that is something we cannot do.

https://wordpress.org/support/topic/settings-not-saving-and-showing-up-as-blank/

Also, a possible feature request would be to instead of adding the form fields in the body of the post would it be possible to append the JSON object as a query parameter?

ats-org avatar Jan 28 '22 03:01 ats-org

Salutare, Here you may find a quick solution. https://wordpress.org/support/topic/problems-after-update-49/#post-15341751 Hope it helps.

sealview avatar Feb 08 '22 13:02 sealview

With CF7 5.5.4 @sealview solution works for saving, but the API is never called when a form is submitted. The only error i saw when turning on WP debug was

Array to string conversion in wp-content/plugins/cf7-to-api-basic-auth/includes/class-cf7-api-admin.php

on these two lines:

<textarea name="template" rows="12" dir="ltr" placeholder="<?php echo esc_attr( $xml_placeholder );?>"><?php echo isset( $wpcf7_api_data_template ) ? $wpcf7_api_data_template : ""; ?></textarea>

<textarea name="json_template" rows="12" dir="ltr" placeholder="<?php echo esc_attr( $json_placeholder );?>"><?php echo isset( $wpcf7_api_json_data_template ) ? $wpcf7_api_json_data_template : ""; ?></textarea>

tconley avatar Feb 09 '22 21:02 tconley