Forum Replies Created

Viewing 15 replies - 1 through 15 (of 185 total)
  • Thread Starter biswajeet

    (@biswajeet)

    Hi I am currently using the latest version – 7.2.2 and total comments number is not updating. We can check if it actually does by the following test code running early as the DOM ready –

    $('.wpd-thread-info > span.wpdtc').text('...');

    It will remove the total comments no. and watch to see if the post ajax comments loading also update the number.

    Since it’s not working for me, I have to write the following codes in my script file within my themes to make it work –

    
    // Options for the observer
    const config = { attributes: false, childList: true, subtree: true },
            
    commentNode = document.querySelector('#wpd-threads > .wpd-thread-list'),
    
    // Create an observer instance
    observer = new MutationObserver(function(mutationsList, observer) {
    
      //observe only once
      this.disconnect();
    
      setTimeout(() => {
    
        let comments = $('.wpd-thread-list .wpd-comment-author').length;
    
        $('.wpd-thread-list .wpd-view-replies').each((i, replyComment) => {
    
          const r = $(replyComment).text().match(/\d/);
    
          if ( r.length ) 
            comments += parseInt(r[0]);
    
        });
    
        $('.wpd-thread-info').attr('data-comments-count', comments)
          .find('> span.wpdtc').attr('title', comments).text(comments);
                
      }, 1000);
    
    });
    
            
    // Start observing the comment node when available
    if ( commentNode ) {
                
      $('.wpd-thread-info > span.wpdtc').text('...');
      observer.observe(commentNode, config);
                
    }
    

    I hope this will help out anyone looking for the same issue…

    thanks,
    biswa!

    Thread Starter biswajeet

    (@biswajeet)

    Hi, we are using a custom caching implementation.

    In your code in the comment section:

    <div class="wpd-thread-info " data-comments-count="yy"> <span class="wpdtc" title="yy">yy</span> Comments</div>

    You can fix the issue by simply updating the total nos. of comments for the element span.wpdtc replacing the old number yy after ajax loading is completed.

    Alternately, if you provide api option for javascript callback(args…) post ajax loading then we can also hook our code to accomplish the task.

    thanks,
    biswa!

    Version 3 have performance issue. Though footer scripts are packed and placed in header with defer, but in practical experience it causes delay. This force me to switch back to FVM v2.8.9 which I believe to be the best one.

    Thread Starter biswajeet

    (@biswajeet)

    Dear Author, I am happy to see your continuous support willingness to keep the plugin alive. This one is a great plugin towards WP loading performance and I highly appreciate you works.

    ??

    Yes files are combined to one single file and number of files to be combine can be configure in its setting page. Additionally caching duration can also be configured to any desire duration directly in the cache config php file.

    Note: All JS/CSS files in a wordPress site must be loaded with standard WP script loading api other wise this plugin will not capture such files…

    biswajeet

    (@biswajeet)

    The plugin will not be effective for 3rd party css/js files existing on other domains.

    Additionally, css/js files must be loaded using WP Script loading API otherwise these files would be excluded from the combination/compression.

    biswajeet

    (@biswajeet)

    Yes, this is exactly what most use to find the source of error. After detecting the problematic script, you can make necessary changes to rectify the issue in case if you are good in JavaScript…

    biswajeet

    (@biswajeet)

    This feature is not currently available as a direct setting option as far I know. Hope to see this in the feature version.

    But in anyway we can implement it if we have some exposure in wp plugin development subject topic following the steps –

    1. Changing the location of cache directory
    2. Map static.mysite.com -> cache directory
    3. Using the plugin filter to replace url part
    
    • This reply was modified 8 years ago by biswajeet.
    biswajeet

    (@biswajeet)

    The JavaScript error needs a careful debugging, locating the source of error and making necessary changes for correction.

    JS/CSS files when loaded using WP script loading API, it is automatically added to the combination and compressed by the plugin. So if you want to add a script then you need to call accordingly…

    biswajeet

    (@biswajeet)

    The plugin works ok with PHP 5.6.x
    Please provide details regarding issues you are experiencing…

    Since you have already seen cache files that means the plugin is working fine and you don’t see .gz extensions in the html source which is normal because the plugin map request automatically.

    Now regarding Page Speed message, there may be some css/js inline or files used by some plugins/themes that are not using standard WP scripts loading api and in such case BWP will not able to detect those…

    Do your search is done through ajax? If yes have you got any script error after installing bwp?
    In case, if it is not ajax search then can you provide more details about your broken result, exactly what happen when performing a search. And also if possible provide a link to the site.

    It would be great if all CSS are combined into one single file in case if you don’t care about media types. Currently, there is not any setting in BWP for this functionality. You have to manually achieve by changing all to screen for every plugins/themes you use. But this is not a standard practice, hence not recommended…

    Inline scripts compression is generally handled by source html compression plugins which is a different objectives than the BWP. I don’t think such a feature can be easily added to BWP…

    The current version is only limited to 1 day. Though it can be manually set in the cache config file, It will be wonderful to have 7 days as default Max-Age

    thanks!

Viewing 15 replies - 1 through 15 (of 185 total)