Hi there, after the latest ACF Update I get this error in my frontend acf_form()
:
ReferenceError: wp is not defined in input.min.js
I am running on the latest WP install. Any fixes?
I activated SCRIPT_DEBUG
and found the code that is throwing the error (line 10123 in acf-input.js):
// bail early if no media views
if( !wp || !acf.isset(wp, 'media', 'view') ) {
return;
}
What type of field is causing this error?
Hi John, I have a lot of different field types in my form. Tested it with simple text fields only after your comment, but the error persists.
But good news – I solved it 5 minutes ago by adding wp-util
as a dependency to my main script:
wp_enqueue_script( 'app', asset_uri('assets/js/app.js'), array('jquery', 'wp-util'), null, true );
So maybe you guys just forgot to add it as a dependency in acf_form_head
?