Navigation überspringen

[Gelöst] Toolset Types compatibility issue with WP 2FA

This support ticket is created vor 4 years, 7 months. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Zeitzone des Unterstützers: Europe/London (GMT+01:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Aldo vor 4 years, 7 months.

Assistiert von: Nigel.

Author
Artikel
#2199455

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

#2199567

Nigel
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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.

#2200689

Nigel
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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.

#2201283

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