you are able to send email with wp_mail?
It seems to be a problem with my child theme. I have activated the original theme (Chaplin) and can now submit forms. Can it be that it has something to do with the order of loading the scripts. Unfortunately I am not a WP developer (PHP, JavaScript).
yes, this is the classic child theme misconfiguration! if you want to try to fix it, the most common error is that the child and parent “enqueue scripts” have the same name and overwrite each other or the child is enqueued before the main theme.
Ok, but why had it worked until now only with the update to 5.7.2 I could see the behavior.
and why only with Chrome / Edge
did you have security plugin / host security rules (like mod_security)?
-
This reply was modified 4 years, 1 month ago by
Erik. Reason: typo
No, i don’t have plugins like this.
I only have these plugins that have something to do with secutiy.
* Limit Login Attempts
* Email Address Encoder
* Akismet Anti-Spam
* Health Check & Troubleshooting
and by (temporarily) disabling these plugins, what happens?
I have found the cause of the issue. There was a script in the Child Theme that disabled the REST API.
After I commented it out, the form works again with Chrome/Edge. What I am wondering now is why did it work with Firefox?
//Disable rest API interface for unregistered users
// add_filter( ‘rest_authentication_errors’, function( $result ) {
// if ( ! empty( $result ) ) {
// return $result;
// }
// if ( ! is_user_logged_in() ) {
// return new WP_Error( ‘401’, ‘not allowed.’, array(‘status’ => 401) );
// }
// return $result;
// });`