Home › Forums › Backend Issues (wp-admin) › ACF wysiwyg and formidable form
As this bug was previously on the roadmap (for the v 4.2.1 if I remember well), and I can’t find its reference, I just submit it again.
When I use the WYSIWYG editor most of the tool are functional despite the link button. When I click on it I get this error in the console :
TypeError: 'undefined' is not a function (evaluating 'c.wpdialog({title:e.title,width:e.width,height:e.height,modal:true,dialogClass:"wp-dialog",zIndex:300000})')
in the file : wp-includes/js/tinymce/wp-tinymce.php (line 24).
Hopping this will help.
Thanks for all the job you do with this plugin.
Hi @loic_syclo
Thanks. I’ll add this back into the to-do.
I believe it was removed by accident when moving around some to-dos.
Cheers
E
Hello Elliot,
I am experiencing similar problem with ACF 4.2.2 (Option page 1.2.0) right now. When I deactivate Formidable 1.07.01 the problem is gone. The problem is only for Options page and for WYSIWYG link button.
Uncaught TypeError: Object [object Object] has no method 'wpdialog'
in the wp-includes/js/tinymce/wp-tinymce.php line 24
Temporary solution:
add_action( 'admin_init', 'wpuxss_admin_scripts' );
function wpuxss_admin_scripts()
{
global $pagenow;
if (( $pagenow == 'admin.php' ) && ($_GET['page'] == 'acf-options') )
{
wp_enqueue_script( 'wplink', home_url('/wp-includes/js/wplink.js') );
wp_enqueue_script( 'popup', home_url('/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js') );
}
}
Thanks for the code and solution. Can you elaborate more on how this resolves the issue?
Thanks
E
Hi Elliot.
Unfortunately, I didn’t have too much time to really find what causes the problem. I just compared the final HTML codes of the ACF Option page: with active Formidable and without. I found that we miss those scripts when Formidable is on. It re-declares the scripts somehow.
Since I needed some fast temporary solution, I just linked those 2 scripts “manually”. By and large, we miss some other scripts too when Formidable is on, but since these two were enough to make link button work, I stopped on them. I also don’t know where ACF registers these two or maybe WP itself does this for all admin pages? When I have more time, I will study this problem more carefully.
Sorry for not being too helpful.
Hello,
I have the same problem.
The solution of wpUXSolutions works but is not clean.
Do you have a way for the resolution?
Thanks
For info, the bug is still present with wordpress 3.9
I just updated a site, the problem seems to occur only with formidable pro not with formidable free version.
I just adapted @wpUXsolutions hack to be able to work with post and custom post :
add_action( 'admin_init', 'wpuxss_admin_scripts' );
function wpuxss_admin_scripts()
{
global $pagenow;
if (( $pagenow == 'post.php' ) || ( ( $pagenow == 'admin.php' ) && ($_GET['page'] == 'acf-options') ) )
{
wp_enqueue_script( 'wplink', home_url('/wp-includes/js/wplink.js') );
wp_enqueue_script( 'popup', home_url('/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js') );
}
}
The topic ‘ACF wysiwyg and formidable form’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.