Hello
We just found out that Toolset Types invokes many JS error in combination with WP 2FA (https://wordpress.org/plugins/wp-2fa/ )
Please see attached screenshot.
The JS errors appears when a user set a new email in the WP 2FA wizard to get the authentication codes.
This wizard is called on the profile.php page.
Thanks for looking into this.
Best,
Aldo
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Hi Aldo
I did some testing and came across JS errors from Types when trying to enter the required authentification code when logging in.
I've escalated this so it can be investigated further to identify the cause.
I'll update you again with any findings.
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
There is a conflict with an autocomplete feature from Types on the user profile page that triggers this issue.
It is possible to prevent it by dequeueing the Types JS file that provides the feature.
You can add the following PHP code to your site to do that (at Toolset > Setttings > Custom Code or in your theme's functions.php):
/**
* Dequeue embedded basic.js on user profile
*/
function ts_dequeue_scripts( ){
$screen = get_current_screen();
if ( "user-edit" == $screen->base || "profile" == $screen->base ) {
wp_dequeue_script( 'wpcf-js-embedded' );
}
}
add_action( 'admin_print_footer_scripts', 'ts_dequeue_scripts', 1 );
I tested it and it worked. I didn't notice any side effects on the user profile page, but you may want to do some simple testing to confirm the same.
Hi Nigel
Thanks a lot for the fix.
If the autocomplete feature from Types is not needed in the profile page, maybe you could permanent disable it?
Best,
Aldo