• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!
    • Docs
      • Installation
      • Changelog
    • FAQ
    • Support
      • Free Support
      • Pro Support
    • PRO

    Troubleshooting Javascript Errors

    Intro

    If you notice an issue with our player and you see a JavaScript error on the browser Developer Tools console, it doesn’t automatically mean the fault is in our plugin. Some of the JavaScript errors are so severe that they just stop any other JavaScript from working. In that case you need to troubleshoot your website.

    Here is our down-to-basics approach to it which we use to troubleshoot sites where we have little access with minimal resources and maximum speed.

    Troubleshooting steps

    Here are the steps we use to troubleshoot JavaScript issues on any site. It requires good understanding of HTML and some troubleshooting skills. If you are unsure about that, check our general troubleshooting instructions.

    Advantage is that it won’t disrupt your site and that you can do these changes on localhost most of the time, so the file editing is very quick.

    1. Disable any JS concatenation or minify.
      1. Perhaps that already fixes the issue? Let us know what you use and we will post some suggestions to you.
    2. Open the URL where you can see the issue.
    3. Open the page HTML source code (View Source), copy it and save it as a HTML file. Store it on your site like: http://mysite.com/test.html
      1. If the video is not using FV Player Pro Vimeo or CloudFront integration, just store it on your http://localhost (if you use Windows, get XAMPP, if you use Mac, get MAMP to have your http://localhost running), but using your site domain will provide a better testing environment.
    4. Now that you have the HTML version of your site ready we can check what script is causing the issues. But first open it and make sure you are able to reproduce the same issue with playback.
    5. Open the HTML in some editor which supports regex well, such as Komodo Edit.
    6. Replace “(<script[\s\S]*?</script>)” with “<!–DIS\1END–>” this will disable any JavaScript by putting it into a <!–DIS …. END–> HTML comment.
    7. Open your HTML page again and double check on Developer Tools Network panel that no JavaScript is loading.
    8. Now remove the <!–DIS …. END–> HTML comment around jquery.js, jquery-migrate.min.js, fv-flowplayer.min.js, fv_player_pro.min.js.

    Does your video play now? If it does then there is indeed just some conflict in JavaScript which causes this. Now it’s time to find what JavaScript is causing that.

    1. Remove the <!–DIS …. END–> HTML comment around another commented out script.
    2. Does the video still play? Go back to step 1. in this section. If it doesn’t play, put the comment around that script back and proceed to next script using step 1. in this section.
    3. If you got to this step, then you have removed almost every HTML comment around almost every script tag and the ones which have to stay commented for our player to keep playing the video are the ones which cause the issue.

    Now is a time to look directly at the conflicting scripts.

    1. Open the URL of the first commented out script, copy the content and paste it to a new <script> tag below the commented script.
    2. If the script is minified you can use jsbeautifier.org to format it.
    3. Now you can use the same “divide and conquer” pattern on the actual source of the script to find the lines which cause the conflict.
      1. In one of our recent Pro support tickets we found a script in the theme used a bad syntax for a jQuery selector like this: jQuery(‘a[href=#top]’).click(function(){ instead of jQuery(‘a[href=”#top”]’).click(function(){ that was causing an error reported in jquery.js. The error was so severe that it didn’t said it’s in the linked theme script.

    Conclusion

    This way you are able to solve any issue. Often the issue was on your site all the time but you haven’t noticed as you haven’t used any serious plugin which uses JavaScript on your site front-end before.

    Reader Interactions

    Primary Sidebar

    Troubleshooting

    1. Why FV Player?
    2. Getting Started
    3. Creating and Managing Playlists
    4. FAQ
    5. Setting Screens
    6. Video Hosting
    7. Advanced features
    8. Video Security
    9. Video Membership, Pay Per View and eLearning
    10. FV Player VAST/VPAID
    11. Tools
    12. Live Streaming
    13. Analytics
    14. Video Advertising
    15. Casting Options
    16. Audio Player
    17. Troubleshooting
      1. How to Use the Built-in Video Checker
      2. Switching FV Player Pro to Beta
      3. Incompatible Plugins and Scripts
      4. Troubleshooting Javascript Errors
      5. Video Encoding for HTML 5
      6. Using HLS With FV Player
    18. For Developers
    19. FV Player Demos
    20. Additional Services
    21. Legal

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2022 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. +1 518 412 4600

    We are using cookies to give you the best experience on our website.

    You can find out more about which cookies we are using or switch them off in settings.

    Powered by  GDPR Cookie Compliance
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

    Necessary Cookies

    Strictly Necessary Cookie allow you to log in and download your software or post to forums.

    We use the WordPress login cookie and the session cookie.

    If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

    Support Cookies

    Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

    We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!

    3rd Party Cookies

    This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

    Keeping this cookie enabled helps us to improve our website.

    We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

    Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!