• Resolved MellowLyric

    (@darrylbosch)


    When submitting a contact form, the following error messsages are generated everytime:

    [03-Apr-2023 21:25:28 UTC] PHP Warning: Undefined array key 1 in /home4/…/public_html/wp-content/plugins/wpforms-lite/includes/fields/class-gdpr-checkbox.php on line 304
    [03-Apr-2023 21:25:28 UTC] PHP Warning: Trying to access array offset on value of type null in /home4/…/public_html/wp-content/plugins/wpforms-lite/includes/fields/class-gdpr-checkbox.php on line 304

    This is the basic contact form only modified to have the simple name field rather than first and last name. If I uncheck the GDPR box, the error goes away.

    All plugins and WP are up to date. This has been ongoing for some time through different versions of this plugin and WP.

    Suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey @darrylbosch – Thanks for reaching out!

    When you have sometime, can you please try the steps described in our detailed guide on?how to test for plugin/theme conflicts and see if that helps?

    Kindly,

    Hi @darrylbosch – Sorry to hear about the trouble you are facing here!

    When you get the chance, would you mind sharing the form URL with us so that we can take a closer look?

    Thanks,

    • This reply was modified 1 year, 11 months ago by Nik Sebastian.
    Thread Starter MellowLyric

    (@darrylbosch)

    Hi @prashantrai. I followed the advice in your link but the error persists. I deactivated all plugins, completed the form, and the same error is generated. I switched from OceanWP theme to Twenty Twenty-Two theme and the same error is generated.

    Hi @niksebastian, this site is under development and contains proprietary information that is not ready for public viewing yet, so I am unable to share the URL publicly. Thanks for your offer, though.

    Hey @darrylbosch – Thanks for following on this ticket!

    Looking at the error message, it seems to be related to the GDPR field. When you have sometime, can you please check and let me know if you’ve enabled GDPR field on the form?

    Kindly,

    Thread Starter MellowLyric

    (@darrylbosch)

    Hello again, @prashantrai.

    Yes, I do have GDPR enabled.

    I actually found a solution to the problem. I thought I would try to disable the different anti spam options to see if that made a difference. My settings included an option to enable an anti-spam honeypot. I read through some more documentation and learned this this option is only available on forms created prior to plugin version 1.6.2.

    So, I created a new simple contact form identical to the original, enabled anti-spam protection and Akismet anti-spam protection (the anti-spam honeypot option was no longer available) and now it works fine without the error. This works on both my live and local development sites.

    I guess the form was too old for the updated plugin.

    Thanks for your help and suggestions. Maybe this will help others.

    Hey @darrylbosch – Thanks for sharing the details, and I’m glad you were able to fix the issue. If you have any questions, please feel free to reachout.

    Kindly,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Errors with Contact Form’ is closed to new replies.