Validation error in custom tag
-
Hi, i found a problem while sending form with custom tags.
The form gave me error 500 generated by wp-json/contact-form-7/v1/contact-forms/3497/feedback
So i activated wp_debug and found this:
[28-Feb-2023 14:05:19 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_invalid_fields() on null in /home/ima/public_html/wp-content/plugins/contact-form-7/includes/submission.php:645 Stack trace: #0 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/submission.php(82): WPCF7_Submission->validate() #1 [internal function]: WPCF7_Submission->{closure}() #2 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func(Object(Closure)) #3 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/submission.php(131): wpcf7_switch_locale('en_US', Object(Closure)) #4 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/submission.php(35): WPCF7_Submission->proceed() #5 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(1043): WPCF7_Submission::get_instance(Object(WPCF7_ContactForm), Array) #6 /home/ima/public_html/wp-content/plugins/contact-form-7/includes/rest-api.php(357): WPCF7_ContactForm->submit() #7 /home/ima/public_html/wp-includes/rest-ap in /home/ima/public_html/wp-content/plugins/contact-form-7/includes/submission.php on line 645
So i checked my from and i use three custom tag, if i remove these custom tags the form works again.
I use the tag validation filter like this:
add_filter( 'wpcf7_validate_ima_acceptance1*', 'wpcf7_checkbox_validation_filter', 20, 2 );
and i found out that if i remove this validation the form works again, so the problem is in this code.
Can you help me understand where the problem is?
Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Validation error in custom tag’ is closed to new replies.