Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try this JS code.

    $('.wpcf7').addClass('novalidate').on('wpcf7invalid', function (e) {
    this.classList.remove('novalidate');
    });
    Thread Starter cs181

    (@cs181)

    I have to borrow the code in replace_all_form_tags() function. I run the shortcodes in the parsed $form first. And then parse the form-tags returned from the shortcodes :

    add_filter( 'wpcf7_form_elements', 'mycustom_wpcf7_form_elements' );
    function mycustom_wpcf7_form_elements( $form ) {
    	$form = do_shortcode($form);
    	$manager = WPCF7_FormTagsManager::get_instance();
    	if ( wpcf7_autop_or_not() ) {
    		$form = $manager->normalize( $form );
    		$form = wpcf7_autop( $form );
    	}
    	$form = $manager->replace_all( $form );
    	// $this->scanned_form_tags = $manager->get_scanned_tags();
    	return $form;
    }
    Thread Starter cs181

    (@cs181)

    Hi Kim White. The website does have a Facebook login plugin installed and activated. But I did try to deactivate all the activated plugins to find the cause and that did not resolve the 401 issue at all. So I don’t think it’s the plugins.

    The reason why I don’t want the 401 page to show up is because I have received quite a lot of complaints, mostly elder people, that they had difficulty following the correct procedure of registering, setting a login password and logging into the website And they ended up seeing a 401 page that stopped them from login onto the website for like 5 minutes. So I think instead of a 401 page, it’d be good to have a message shown on the login page telling the users to contact me for help.

    I also noticed that not just failed login attempts could result in 401. If you keep on refreshing the page or switching between the login, registration and forgot password pages you can get a 401 as well.

    Here is another WP website that I worked on before that does not have this issue. https://waterdale.com.au/wp-login.php I am guessing the possible cause could be the web hosting server because they are hosted on different hosting companies.

    Anyone got any idea, please?

    Thread Starter cs181

    (@cs181)

    Thank you t-p. I tried your suggestions and the 401 still occurring.

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