Enclavely / tailor

Build beautiful page layouts quickly and easily using your favourite WordPress theme.
https://www.tailorwp.com
GNU General Public License v3.0
1.05k stars 102 forks source link

Editor conflict with Gravity Forms #88

Open toderash opened 7 years ago

toderash commented 7 years ago

When tailoring a page with a Gravity Form in it, I get the endless loading icon, even when the page load is complete. js console says Uncaught TypeError: jQuery(...).mask is not a function

Tracked this to apparent script conflict between GF jquery.maskedinput.min.js and Tailor jquery.maskedinput.min.js As a workaround, I put the following into a function hooked to wp_print_scripts:

if ( ! is_user_logged_in() ) return false; if ( wp_script_is( 'tailor-canvas', 'queue' ) && wp_script_is( 'gform_masked_input', 'queue' ) ) { wp_dequeue_script( 'gform_masked_input' ); wp_deregister_script( 'gform_masked_input' );

Page loads now for editing. Is there a better way to do this? Will need to bake a solution into Tailor somewhere, as GF is a fairly common plugin.

toderash commented 7 years ago

Found two more to update my hack above: wp_dequeue_script( 'gform_gravityforms' ); wp_deregister_script( 'gform_gravityforms' );

I'm also using CountUp.js in the theme, and had to add that to this hack as well.