• Resolved dholtzman

    (@dholtzman)


    We have a fairly complicated membership form which offers a PayPal or Submit button based on other fields in the form. On our new development site, when a user specifies they are in the UK and selects payment by cheque, the form submission fails with the generic error above. We are (as I just discovered) using the forminator-paypal-toggle.php mu-plugin. We have a similar form on our live site at https://concertina.org/membership/ which does not exhibit the same problem. The plugin versions are the same, and I’ve looked through what I think are the relevant fields and settings without finding any differences. Can you give me an idea what might be causing this issue? Thanks in advance for your help!

    Here are the two full log errors that appear when we try and fail to submit the form:

    Warning: Undefined array key “payment_transaction_id” in /home/dh_vdjvx2/ica.maybeso.net/wp-content/plugins/forminator/library/fields/paypal.php on line 280

    Fatal error: Uncaught Error: Call to undefined function forminator_fields_to_array() in /home/dh_vdjvx2/ica.maybeso.net/wp-content/mu-plugins/forminator-paypal-toggle.php:71

    Stack Trace

    1.WPMUDEV_Forminator_PayPal_Toggle->custom_paypal_entry_data(Array, Object(Forminator_Form_Model), Array, Array)/home/dh_vdjvx2/ica.maybeso.net/wp-includes/class-wp-hook.php:3083.apply_filters(‘forminator_cust…’, Array, Object(Forminator_Form_Model), Array, Array)/home/dh_vdjvx2/ica.maybeso.net/wp-content/plugins/forminator/library/modules/custom-forms/front/front-action.php:16734.Forminator_CForm_Front_Action::paypal_field_to_entry_data_array(Object(Forminator_Form_Entry_Model))/home/dh_vdjvx2/ica.maybeso.net/wp-content/plugins/forminator/library/modules/custom-forms/front/front-action.php:8945.Forminator_CForm_Front_Action::handle_paypal(Object(Forminator_Form_Entry_Model))/home/dh_vdjvx2/ica.maybeso.net/wp-content/plugins/forminator/library/modules/custom-forms/front/front-action.php:9456.Forminator_CForm_Front_Action->handle_form()/home/dh_vdjvx2/ica.maybeso.net/wp-content/plugins/forminator/library/abstracts/abstract-class-front-action.php:4507.Forminator_Front_Action->save_entry(”)/home/dh_vdjvx2/ica.maybeso.net/wp-includes/class-wp-hook.php:30810.do_action(‘wp_ajax_formina…’)/home/dh_vdjvx2/ica.maybeso.net/wp-admin/admin-ajax.php:18811.{main}thrown in /home/dh_vdjvx2/ica.maybeso.net/wp-content/mu-plugins/forminator-paypal-toggle.php on line 71

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @dholtzman

    I hope you are doing well today.

    I pinged our SLS team to review this. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

    Hi again @dholtzman

    After consultation with SLS Team it seems this is very old mu plugin and forminator_fields_to_array() isn’t used in Forminator any more. I asked them can we make updates in this matter. Thank you for your patience while we look into this further.

    Kind Regards,
    Kris

    Thread Starter dholtzman

    (@dholtzman)

    Thanks for your quick reply! This issue appears to be resolved, but I remain concerned because 1) I’m not sure why the changes I made eliminated the error, and 2) your reply suggests that our use of the mu plugin may cause other problems.

    The UK Members only – Method of Payment field in the form has five options, two of which cause the PayPal/Credit buttons to appear and three of which cause the Submit button to appear. As I continued testing, I was surprised to find that choosing “BACS”, which should have exactly the same effect as “Cheque”, did not produce the error.

    I compared this field with the equivalent field on the live site, and I found that the values that entered under the labels when each option is expanded in the field settings were not the same, presumably because I did not check these when I recreated the field in the new version of the form. I changed them all to match the live site, which included changing the value “Cheque” to the lower-case “cheque”. This appears to have fixed the problem, though I’m not sure it did so immediately on one of my two test sites.

    I also unhid and re-hid the the “PayPal or not PayPal field” which is an intermediate calculation field which actually toggles the visibility of the PayPal buttons.

    Please let me know if you can shed any light on this mysterious result, and if you recommend we make any other changes relating to our use of the mu-plugin.

    Thank you very much.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @wpmudevsupport13 ,

    I compared this field with the equivalent field on the live site, and I found that the values that entered under the labels when each option is expanded in the field settings were not the same, presumably because I did not check these when I recreated the field in the new version of the form. I changed them all to match the live site, which included changing the value “Cheque” to the lower-case “cheque”. This appears to have fixed the problem, though I’m not sure it did so immediately on one of my two test sites.

    That actually could be the reason for the error – if you changed the value in the option, my guess is that before there was some character (invisible) that was breaking the script.

    As for the mu-plugin our developers are still checking it.

    kind regards,
    Kasia

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @dholtzman ,

    Please try this updated code snippet https://gist.github.com/wpmudev-sls/7077822d3f398d509f7c0aff268028c4

    kind regards,
    Kasia

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @dholtzman ,

    We haven’t heard from you for 4 days now, so it looks like you no longer need our assistance.

    Feel free to re-open this ticket if required.

    Kind regards
    Kasia

    Thread Starter dholtzman

    (@dholtzman)

    Thanks very much for the snippet. I put it in the mu-plugins folder in place of the existing mu-plugin–was that correct?

    The buttons (PayPal or Submit) are still displaying when they should based on other fields in the form, but we haven’t had a chance to test actual transactions. If anything doesn’t work right, I’ll let you know. Thanks again.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @dholtzman ,

    I put it in the mu-plugins folder in place of the existing mu-plugin–was that correct?

    Yes, that is correct.

    kind regards,
    Kasia

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘An error occurred while processing the form.’ is closed to new replies.