• Resolved Thomas Cigolla

    (@tcigolla)


    No forms can be submitted from Chrome, no message comes up and the form waits.
    From Firefox everything works fine.
    wp 5.7.2
    contact form 5.4.1

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • you are able to send email with wp_mail?

    Thread Starter Thomas Cigolla

    (@tcigolla)

    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.

    Thread Starter Thomas Cigolla

    (@tcigolla)

    Ok, but why had it worked until now only with the update to 5.7.2 I could see the behavior.

    Thread Starter Thomas Cigolla

    (@tcigolla)

    and why only with Chrome / Edge

    did you have security plugin / host security rules (like mod_security)?

    • This reply was modified 3 years, 6 months ago by Erik. Reason: typo
    Thread Starter Thomas Cigolla

    (@tcigolla)

    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?

    Thread Starter Thomas Cigolla

    (@tcigolla)

    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;
    // });`

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘contact form does not work with chrome’ is closed to new replies.