-
AuthorPosts
-
June 3, 2018 at 3:10 am #966022
With the latest version of the theme installed, I found Advanced Custom Field Front-end form’s upload buttons are not working properly. I tried switching the theme to something else and it worked fine on that. So, the issue is clearly some conflict with enfold.
This is the error i see on console:
Uncaught TypeError: Cannot read property 'query' of undefined at Object.new_media_frame (acf-input.min.js?ver=5.6.10:2) at Object.popup (acf-input.min.js?ver=5.6.10:2) at Object.add (acf-input.min.js?ver=5.6.10:2) at HTMLAnchorElement.<anonymous> (acf-input.min.js?ver=5.6.10:1) at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3) at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)
Please check. Thanks!
June 4, 2018 at 5:31 pm #966658Hey MM,
Can you give us ftp access also? so we can check further.
Just post the details in private content.Best regards,
NikkoJune 4, 2018 at 5:41 pm #966663Sure. Please check
June 5, 2018 at 11:16 am #967142Hi MM,
Thanks for giving us ftp access.
It should be working now. I have modified this code in functions.php (line 417-419)://load mediaelement js $condition = !( isset($options['disable_mediaelement']) && $options['disable_mediaelement'] == "disable_mediaelement" ) && av_video_assets_required(); $condition2 = ( version_compare( get_bloginfo( 'version' ), '4.9', '>=' ) ) && $condition;
and replaced it with:
//load mediaelement js $condition = true; $condition2 = true;
Let us know if you need further assistance.
Best regards,
NikkoJune 5, 2018 at 11:20 am #967146Thanks for the update.
As I am using relatively same setup on few other sites and I am using a child theme on all of them, can you please let me know if this fix can be done via child theme instead? Plus is there any chance of this conflict getting fixed in next updates?
Regards
June 5, 2018 at 12:06 pm #967174Hi,
Try adding this php code in your functions.php:
function custom_loadscripts() { avia_enqueue_script_conditionally( true , 'wp-mediaelement' , "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1); avia_enqueue_style_conditionally( true , 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.css", array('mediaelement')); } add_action('wp_enqueue_scripts', 'custom_loadscripts', 20);
Hope it helps.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.