• Resolved paulpif

    (@paulpif)


    We use your plugin in conjunction with our own custom plugin that uses a Forminator hook upon form submission to add form data to our custom fields in WordPress.

    This has been working fine with Forminator version 1.15.14. However, when the plugin recently auto updated to version 1.16.2, we noticed that form submissions stopped working; giving the following error:

    ‘An error occurred while processing the form. Please try again’

    I wonder if you would be able to help me identify what has cause this conflict with the version 1.16.2.

    For the time being i’ve rolled back to version 1.15.4 and disabled auto updates, so all currently working, but it would be great to identify and fix the issue so that I can continue to keep you plugin up to date.

    Best regards

    Paul

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @paulpif !

    I hope you’re doing great!

    The update may be linked to the issue you’re experiencing as we’ve finally deprecated some of the filters/actions and changed the names of some of them or added additional arguments. There should have been a notice about that before the 1.16 update which contained those changes.

    https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/#modified-or-deprecated-hooks

    However it shouldn’t be too difficult to adjust the code to match the changes. If that’s okay, please share the snippet you’re using through a service such as https://pastebin.com and we’ll suggest the necessary changes.

    Warm regards,
    Pawel

    Thread Starter paulpif

    (@paulpif)

    Hi Pawel,

    Many thanks for your reply.

    I’ve added a snipped of the code where the error seems to be occurring, here:

    https://pastebin.com/22rVJGDQ

    I have inspected the code and I think the issue is due something to do with line 33 (
    – the: add_filter( ‘forminator_replace_form_data’, function ($content, $data, $fields, $original_content) – which it look like i need to remove the ‘$fields’ variable, but i’m not sure how this will affect the code (i didnt write this code, and am rather inexperience with this coding).

    I’d really appreciate your advise.

    Kind regards

    Paul

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @paulpif

    Try this change for the start”

    Replace

    add_filter( 'forminator_replace_form_data', function ($content, $data, $fields, $original_content) {

    line with

    add_filter( 'forminator_replace_form_data', function ($content, $data, $original_content) {

    NThe callback function doesn’t seem to use $fields anywhere so it should be okay with this change. I don’t see other changed/deprecated hooks in your code so hopefully this should be enough.

    If it still doesn’t work after that, please do as follows:

    1. enable debugging on site by adding following lines to the “wp-config.php” file of your site, right above the “/* That’s all, stop editing! */” line:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    2. use the form again to trigger error

    3. look into the “/wp-content/” folder of your site’s WordPress installation; there should be a file named “debug.log” so look into that file and you should see error(s) related to Formiantor/your code there; please share these errors with us here.

    Best regards,
    Adam

    Thread Starter paulpif

    (@paulpif)

    Hi Adam,

    Many thanks indeed for your helpful response. I’ve implemented your suggestion:

    Replace
    
    add_filter( 'forminator_replace_form_data', function ($content, $data, $fields, $original_content) {
    
    line with
    
    add_filter( 'forminator_replace_form_data', function ($content, $data, $original_content) {

    This appears to have fixed the issue we were having and our site seems to be operating ok now on version 1.16.2 of Forminator – with the above implemented into our additional custom code.

    Many thanks for your kind and timely help.

    Kind regards

    Paul

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Since last update – Error occurred whilst processing form submission’ is closed to new replies.