Having an issue with the plugin all of a sudden. The thing is this has been working for months and I am not sure what is wrong. The plugin works fine on localhost which leads me to believe that it may be a server issue. Clicking thumbnails no longer works and we are getting this error message in chrome: Uncaught TypeError: Cannot call method 'scrollIntoView' of undefined
You can check out this behavior at our testing site: http://sandbox.45press.com/videos/
I've tried disabling all other plugins and switching themes, but nothing seems to resolve it. Any help would be appreciated.
TubePress Pro thumbnails not working
Started by 45Press, Nov 14 2012 02:24 PM
7 replies to this topic
#1
Posted 14 November 2012 - 02:24 PM
#2
Posted 14 November 2012 - 03:50 PM
I was having the same problem but your videos/playlist and thumbnails are working now on your test site, what was your solution?
#3
Posted 14 November 2012 - 08:35 PM
Still having the same issue, unfortunately. The thumbnails work on the first click but give that error message afterwards.
#4
Posted 15 November 2012 - 09:16 PM
I investigated this and found the problem, though I'm not yet sure what's causing it. Here's the gist..
When you click on a thumbnail, TubePress makes an Ajax request to fetch the HTML for the new video and it's title. The target of this Ajax request is
http://sandbox.45pre.../p...erHtml.php
Go ahead and click on that URL - you'll get some JSON with some URL-encoded HTML. If you URL-decode the HTML, you wind up with
When you click on a thumbnail, TubePress makes an Ajax request to fetch the HTML for the new video and it's title. The target of this Ajax request is
http://sandbox.45pre.../p...erHtml.php
Go ahead and click on that URL - you'll get some JSON with some URL-encoded HTML. If you URL-decode the HTML, you wind up with
<div class="tubepress_normal_embedded_wrapper" style="width: 425px"> <div id="tubepress_embedded_title_" class="tubepress_embedded_title"> Bruce Lee vs Clint Eastwood. Epic Rap Battles of History Season 2. </div> <div id="tubepress_embedded_object_"> <iframe id="tubepress-youtube-player-eHCyaJS4Cbs" class="youtube-player" type="text/html" width="425" height="350" src="http://www.youtube.com/embed/eHCyaJS4Cbs?rel=1&autoplay=1&loop=0&fs=1&showinfo=0&wmode=transparent&enablejsapi=0&autohide=0&modestbranding=1" frameborder="0"></iframe> </div> </div>This is all very normal, except for two pieces; the
s
<div id="tubepress_embedded_title_"> ... <div id="tubepress_embedded_object_">The IDs of these
s should have a number on the end of it, such as
<div id="tubepress_embedded_object_230996771">That missing number is confusing TubePress's JavaScript, and thus preventing your thumbnails from working as expected. What's weird is that on the initial page load, the
s have a proper id assigned to them, which explains why the first thumbnail click works. It only fails when TubePress generates HTML in response to a mouse click.
So the solution is to find out how or why TubePress is stripping out that number. The number itself is set at this point in the code onto this template. Not sure how much of a PHP sleuth you are, but those would be the starting points in debugging.
Have you tried a deleting your existing TubePress installation and replacing it with a fresh copy?
So the solution is to find out how or why TubePress is stripping out that number. The number itself is set at this point in the code onto this template. Not sure how much of a PHP sleuth you are, but those would be the starting points in debugging.
Have you tried a deleting your existing TubePress installation and replacing it with a fresh copy?
#5
Posted 17 November 2012 - 01:20 PM
Yes I have. Deleted, reinstalled, tried non-pro version, etc. Nothing fixes it. What's really strange is that it works fine on localhost, like I said. Could this be some kind of a server issue in regards to the ID problem?
#6
Posted 20 November 2012 - 02:39 AM
OK, I think I finally figured it out. Try the following:
Let us know. Thanks!
- Open up sys/classes/org/tubepress/impl/bootstrap/ProTubePressBootstrapper.class.php with your favorite text editor
- Comment out or delete the following two lines
$pm->registerFilter(org_tubepress_api_const_plugin_FilterPoint::PROVIDER_RESULT,$ioc->get('org_tubepress_impl_plugin_filters_providerresult_SequenceLogger'));
Let us know. Thanks!
#7
Posted 03 January 2013 - 03:51 PM
This seems to fix the original issue. I am, however, running into a new issue now. The same behavior is happening if I enable our site's CDN through Anazon Cloudfront.
I am getting this error:
I am getting this error:
XMLHttpRequest cannot load http://df4ddo5i21l39.cloudfront.net/wp-content/plugins/tubepress_pro_2_4_5/sys/scripts/ajax/playerHtml.php?tubepress_video=-SBE0Ub4zCs&tubepress_shortcode=%255Btubepress%2520galleryId%253D%2522229176290%2522%255D. Origin http://rc1.45press.com is not allowed by Access-Control-Allow-Origin. Uncaught TypeError: Cannot read property 'title' of null
#8
Posted 04 January 2013 - 05:17 PM
I am getting this error:
XMLHttpRequest cannot load http://df4ddo5i21l39.cloudfront.net/wp-content/plugins/tubepress_pro_2_4_5/sys/scripts/ajax/playerHtml.php?tubepress_video=-SBE0Ub4zCs&tubepress_shortcode=%255Btubepress%2520galleryId%253D%2522229176290%2522%255D. Origin http://rc1.45press.com is not allowed by Access-Control-Allow-Origin. Uncaught TypeError: Cannot read property 'title' of null
This is a symptom of cross-domain Ajax. The solution is to either configure your site to not serve /tubepress_pro_2_4_5/sys/scripts/ajax/playerHtml.php from CloudFront (PHP files should never be served via a CDN), or simply configure it to not serve anything from wp-content/plugins/tubepress_pro_2_4_5. The latter might be easier.
Does that make sense?