Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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!

    #966658

    Hey MM,

    Can you give us ftp access also? so we can check further.
    Just post the details in private content.

    Best regards,
    Nikko

    #966663

    Sure. Please check

    #967142

    Hi 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,
    Nikko

    #967146

    Thanks 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

    #967174

    Hi,

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.