Hummingbird CDN breaks certain part of the site.

I have hummingbird installed on divi***** On this page https://www.divi***** there is a js file called vrview.js which I have set in hummingbird to load in the footer. My page functionality is broken. Scroll down to 360 deg photo examples. If I disable CDN it is working fine but If I enable CDN it is not.

The JS and CSS files are loaded on the CDN. The above screenshot shows the file which does not need to be loaded in the CDN.

However its loaded from CDN*****

How do I disable that js file from being served via CDN? Or any other way to fix the issue. Thanks :slight_smile:

  • Nahid

    Hey Matthew !
    Hope you are having a great day!

    I'm sorry to hear about the issue that you encountered. I consulted with the developers of the Hummingbird Pro plugin about this and they took a closer look into the issue. The JS file in question is technically buggy, it calls the file location as a root path instead of the site URL, because of which it'll not work with any CDN provider.

    At the moment, we do not have an individual exclusion feature for CDN in Hummingbird Pro, but the JS file in question can be modified in a way so that it works even when hosted in a CDN.

    To apply the suggested modification, please locate line number 681, which contains the following code:

    return rootPath + '/index.html';

    And add the following line of code just before the above mentioned line:

    rootPath = '';

    So, the entire related function would look like the following:

    Player.prototype.getEmbedUrl_ = function() {
      // Assume that the script is in $ROOT/build/something.js, and that the iframe
      // HTML is in $ROOT/index.html.
      // E.g: /vrview/2.0/build/vrview.min.js => /vrview/2.0/index.html.
      var path = CURRENT_SCRIPT_SRC;
      var split = path.split('/');
      var rootSplit = split.slice(0, split.length - 2);
      var rootPath = rootSplit.join('/');
      rootPath = '';
      return rootPath + '/index.html';

    Alternatively, you can download the file that I uploaded in this response. You should be able to find a vrview.js file extracting the compressed file which contains the suggested modifications. Accessing your site via FTP/cPanel's File Manager, please navigate to {WordPress Installation Directory}/wp-content/plugins/df-vr-view/assets/build/ and replace the existing vrview.js file with the extracted vrview.js file.

    Hope this helps. Let us know if this works for you. Thanks!

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.