You can find the troublesome script and exclude it by doing the following
- Install the Blue Button Chrome extension
- – Turn off minfication and load the page in your browser.
- – In blue button, click on Stylesheets or Scripts to get the list of internal and external CSS and JavaScript files on your site.
- -Turn on minify
– Copy the list of CSS files and add them to Minify CSS >> Exclude the CSS files from processing.
Then, remove the files one by one, checking as you go to see if the script is causing issues
To exclude troublesome JS files;
- Open Developer Tools. You do that either by right-clicking and choosing Inspect Element, or at the top of the window go to: View >> Developer >>Developer Tools
- Find the red error message indicator on the right-hand side
- Click it to open the Console, then click the file referenced in the error notice:
- This takes you directly to the code in the file that is related to the error. Look for the red underline and copy part of that code:
- Open a new browser tab and load the un-cached version of the page. You will need to use an incognito window
- Open Developer Tools, then click the 3 dots on the right side and select Search All Files:
- Paste the problematic code in the search box and it will locate the file in which that code is found:
It’s not possible, unfortunately, to copy the filename from this screen. So to do that, click on the Network tab (reload the page if necessary to pull in the files). Then search for the file in the list:
Once you’ve located the file, right-click on the filename, select Copy, then Copy Link Address to the exclusion list under Minfi >> Javascript >> Exclude JavaScript from processing