Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #878248

    gretar
    Participant

    Hi guys

    I setup w3 total cache on my site, http://laxanet.portal.is (this is not the final live URL) and when I activated js minify the tabs on pages stopped working. For example here, http://laxanet.portal.is/tungufljot-trout/

    What js file can I exclude from the minify list to still keep this working ?

    #878889

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! All of the X assets come pre-minified, so this is only needed if you’re using plugins that include their own scripts and styles. If that’s the case, enable Minify and set the mode to auto. Use the default settings for the rest. Keep in mind that if you’re using a large number of plugins, script minification and concatenation can cause plugin conflicts. If you run into any issues, you can disable this feature.

    Thanks!

    #879481

    gretar
    Participant

    Hi

    I have the minify option set as auto and the default settings are applied and when apply the JS minify settings again the tabs wont work, I will have this setting ON now so you can take a look if you like.

    I have this code here below to stop the auto scroll down the page when a tab is clicked (in X customize edit global javascript), a code you guys provided when somebody posted a thread about this problem. Could this code be a part of the problem re. the tabs ?

    jQuery(document).ready(function($) {
       $('.x-accordion-toggle').click(function() {
          var $adminbarHeight = $('#wpadminbar').outerHeight();
          var $navbarHeight   = $('.x-navbar').outerHeight();
          var $this = $(this);
    
          setTimeout(function() {
             $('html, body').animate({ 
                scrollTop: $this.offset().top - $adminbarHeight - $navbarHeight + 1
             }, 400)
          }, 300)
       });
    });
    
    jQuery(function($){
    
    $('.x-nav-tabs-item a').on('click', function(){
    
    $('html,body').stop().animate({
          scrollTop: $( $(this).attr('href') ).offset().top - $('.x-navbar').height()
        },700 ,'swing');
    
    });
    
    });
    
    jQuery( function($) {
    $(document).on('click touchstart touchend', '.vc_tta-panel, li.vc_tta-tab,li.vc_tta-tab > a,li.vc_tta-tab > a>span,.vc_tta-panel-heading,.vc_tta-panel-heading > h4,.vc_tta-panel-heading > h4 > a', function(){
            $('html, body').stop();
    });
    
    $(document).on('touchstart','.vc_tta-panel', function(){
            $('.vc_tta-panel').removeClass('vc_active');
            $('.vc_tta-panel-body').css('display','none');
            $(this).addClass('vc_active');
            $(this).find('.vc_tta-panel-body').css('display','block');
    });
    
    });   
    #879935

    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #879942

    gretar
    Participant
    This reply has been marked as private.
    #880976

    Rad
    Moderator

    Hi there,

    The content of your minified javascript is faulty. It needs to be purged the same way the need to clear cache every update.

    I went ahead and purged/cleared it but with no luck. The file being served is just the same, hence, there could be another caching feature that is active. Or could be related to your caching setting. It would best if you can contact the plugin author for more information.

    I tried but not able to find what aspect of minifier that causes this issue.

    Uncaught SyntaxError: Delete of an unqualified identifier in strict mode.

    It’s not issue produced by custom javascript, but by javascript generated by minifier.

    Thanks!

    #881550

    gretar
    Participant

    Ok I will contact the plugin owner about this issue. Thank you for your time.

    #881592

    gretar
    Participant

    Sorry ! I noticed that I gave you access to the wrong site !! I posted another thread on your site early yesterday morning because pages were not changeable, the visual composer was no where to be seen. That issue is fixed now because of an X theme update. But can I give you access to the site that really has this tab problem and you can take a look at that ?

    The working URL is http://laxanet.portal.is/

    #881954

    Zeshan
    Member

    Hi there,

    Thanks for updating the thread!

    I’ve checked the site but couldn’t find the tabs on the homepage. Also, it seems you have disabled minification. Please enable that and point us to the page where you have added the tabs.

    One thing to note, script minification may not work because, in rich themes like X, the order in which scripts are being enqueued is important. Usually, minification plugins don’t respect that order that sometimes breaks the JavaScript functionality of the site.

    Thank you!

    #882004

    gretar
    Participant

    Ok so maby minification is not a good idea when using tabs with the X-theme ?

    Here is an example of a page with tabs http://laxanet.portal.is/tungufljot-trout/ and yes I have removed the JS minify, I will enable that again.

    But what do you recommend regarding speeding up the site when it comes to minify-ing things ? As you probably know GTMetrix and Google PageSpeed recommend JS minify to speed up the site.

    #882977

    Rad
    Moderator

    Hi there,

    You can try manual minification in which you can manually choose the resources you wish to minify. I think W3 Total Cache has that.

    Then using any analysis or performance tools like from pingdom. Choose the scripts that you wish to minify, I think it’s just pasting URL. Please check your optimization plugin documentation.

    Thanks!

    #1030733

    Eric-InPursuit
    Participant

    After updating X from 4.4.2 to 4.5.2, I’m also having issues with the W3 Total Cache minify option.

    I don’t have any tabs on my site but it took out everything using JS (slider, parallax, fade effect, etc.).

    For now, I’ve got the minify option disabled and it appears to be working fine.

    The site is: http://campstoregear.com

    Thanks y’all

    #1031466

    Christian
    Moderator

    Hey Eric,

    We’re sorry but we do not have support for caching plugin setup. It would be best to contact a WordPress developer to optimize your site for you as incorrect configuration could mess up your site.

    Thanks.

    #1031920

    Eric-InPursuit
    Participant

    Cristina, I understand that you guys can only do so much and need to stick to supporting your products. I just wanted to make you aware of the issue since I followed your recommendations on setting up W3 Total Cache from your performance article. https://community.theme.co/kb/performance/

    Thanks.

    #1032394

    Christian
    Moderator

    The article serves only as a guide. It might not work in some cases as WordPress setup might differ from site to site.

    Thank you for understanding.