js errors

Hello,

some errors are in shown in inspector / console and i suppose they impact on some functions. (it happens only to non logged users)

Attached the screenshot

Is it a known error?

Thanks


Comments

  • Hi,

    Please always attach a link to your website so we can check it out. If the page is offline(localhost), then our help will be limited. You will have to contact us when the page is online. Also, please ensure that the page is not under maintenance before you provide us with the link.

    Can you also explain in more detail how it affects some functions?


    Thanks

  • Hello,

    the website is: https://tinyurl.com/42xrm96s

    It seems especially that it's blocking a popup from add-to-cart plugin

  • Please, turn off all of the plugins, refresh your cache, and check if these errors still appears

    Moreover, if you use a child theme, switch to parent, and recheck it.

    Thanks

  • Hello,

    i've done it but the error still persists

  • I have rechecked your website, and I do not see errors in the console.

    Also the popup appears, and works correctly

    Did you clear your browser cache? If not, please, do that, and recheck it.


    Thanks

  • yes, errors are gone but i am navigating on incognito mode but pop up does not show anyway

  • I checked that in incognito mode, and a popup appeared as well.

    Please, note that we did not test this plugin with the theme. Our policy states that we do not support third-party plugins or custom codes.

    Also, we cannot recommend any plugins other than the ones we support. You can find the list on this page in the sidebar:

    https://themeforest.net/item/betheme-responsive-multipurpose-wordpress-theme/7758048

    So, in that case, I recommend contacting the plugin author to locate what the problem is.


    Thanks

  • Hello Phil

    i understand and appreciate your point. I have contacted also the plugin author and they asked to contact you regarding js errors. The plugin was correctly working until some weeks ago

    Thanks

  • Unfortunately, I am not able to help. As I mentioned, this problem does not occur on my device (tested with Firefox and Chrome), and we do not support this plugin.

    I can only recommend clearing your browser cache because it might causing this problem.


    Best regards

  • Hello

    i copy / paste what the plugin support wrote. What do you suggest?

    Thanks


    "after doing some debugging I discovered that the problem is caused by some code within your theme, specifically, the one below which you find at the following path:

    /wp-content/themes/betheme/functions/theme-woocommerce.php

     

    if( get_option('woocommerce_enable_ajax_add_to_cart') == 'yes' ){
         add_filter( 'wc_add_to_cart_message_html', '__return_false' );
    }
    
    if( get_option('woocommerce_enable_ajax_add_to_cart') == 'yes'){
          $classes[] = 'mfn-ajax-add-to-cart';
    }
    

     

    To make the plugin work I created this custom code that could solve the issue, but it can create any conflict with your theme, but the right thing would be to contact the theme developers and ask them to add a filter so you can deactivate the default function in your case.

    Add this code to the functions.php of your theme and test it, please:

    if ( ! function_exists( 'remove_body_class_betheme' ) ) {
        function remove_body_class_betheme( $classes ) {
    
            if ( ( $key = array_search( 'mfn-ajax-add-to-cart', $classes ) ) !== false ) {
                unset( $classes[$key] );
            }
    
            return $classes;
        }
        add_filter( 'body_class','remove_body_class_betheme', 999 );
    }
    

     

  • hello, can you please provide a feedback about it?

    thanks a lot

  • We do not provide help with file customization, so unfortunately, I cannot refer to that.

    Also, as I mentioned before, we do not support this plugin, so regarding this, you should stay in touch with the plugin author and your web developer.


    Best regards

  • Thanks any way, Regards

Sign In or Register to comment.