Client-Side Troubleshooting

Use this page if you are having any sort of client-side (front-end) trouble with TubePress. These sorts of problems include

  • Misbehaving/unclickable thumbnails
  • JavaScript errors
  • Problems with the embedded video player

TubePress tries its very best to play nice with all the other scripts that you might have loaded on your site. Even still, there are millions of permutations of scripts that can be loaded on a page, and no software is completely immune to interference from others (regardless of who is to blame). Almost all of the support requests we see in the forum can be traced to the problems outlined on this page. Thankfully the solution to each is often easy.

JavaScript Errors on Page Load

TubePress expects your page to load cleanly; i.e. there should be no JavaScript errors caused by other scripts, plugins, themes, etc. If there is a JavaScript error on page load, it's not uncommon for your TubePress gallery to become "unclickable." The resolution is always to fix the script causing the error. Usually this entails identifying which component of your site (script, plugin, etc) is causing the error.

The best tool, in my opinion, for diagnosing and fixing JavaScript errors is Firebug. I cannot recommend this tool highly enough! Here's what JavaScript errors look like in Firebug

Multiple Instances of jQuery

You may also experience problems if your site is loading jQuery multiple times. This is much more prevalent in WordPress-based sites, where other plugin and theme authors fail to include jQuery "the right way". Multiple loads of jQuery will not only significantly hurt the load-time of your site, but it will also break TubePress.

How can you tell if your site is loading jQuery multiple times? There are two ways:

  1. Inspect your HTML source, hit Ctrl-F and search for "jquery"
  2. Use the venerable Firebug to inspect your site's scripts

As you can probably guess, I highly recommend using Firebug for this. Here's what multiple jQuery loads will look like in Firebug:

The solution in this case is to pare down your scripts to a single jQuery load.

How this solution is accomplished depends on your environment. In standalone-PHP sites, this will usually involve simply editing your site's header to only include jQuery once. In WordPress environments, typically the best method is to disable your plugins one-by-one until you find the offending plugin and/or theme. At that point, you'll need to either edit the plugin/theme's PHP or ask the original author to include jQuery the right way.

Missing tubepress.js

Any page that uses TubePress needs to have tubepress.js loaded in the HTML head of the document. If this file is missing, your gallery's thumbnails won't respond to clicks. You can view your HTML source or use Firebug to verify if this file is being loaded correctly. Here's what a correct load will look like in Firebug

In WordPress, this file will be automatically loaded via your theme's wp_head() function invocation. However, some custom themes will (accidentally or intentionally) omit this call. Switching back to the "Twenty Eleven" WordPress theme will verify if your custom theme is the culprit. Here is some further information on including the wp_head() function in your theme.

If you're using TubePress in a standalone PHP environment, following the basic invocation instructions will load tubepress.js for you.

troubleshoot/client-side.txt · Last modified: 2012/04/26 12:15 by Eric Hough
GNU Free Documentation License 1.3