Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Only First Video In Gallery Works, Nothing Happens When Others Are Clicked

wordpress tubepress-pro youtube

Best Answer eric, 10 February 2013 - 08:31 PM

Fixed! Your initial hunch was correct - the cause of the problem was a malformed <iframe> embed in some of the advertising code. Specifically, it was the middle widget of Footer Sidebar #4 widget area. It looked like this

<iframe src="http://rcm.amazon.com/e/cm?t=oboysports-20&o=1&p=21&l=ur1&category=shorts&banner=0Q6KW3RZAZTTW5085702&f=ifr" width="125" height="125" scrolling="no" border="0" marginwidth="0" style="border:none;"

 
So I fixed it to make it look like this:

<iframe src="http://rcm.amazon.com/e/cm?t=oboysports-20&o=1&p=21&l=ur1&category=shorts&banner=0Q6KW3RZAZTTW5085702&f=ifr" width="125" height="125" scrolling="no" border="0" marginwidth="0" style="border:none;"></iframe>

 
So how did that break TubePress? The malformed HTML caused the web browser to ignore any HTML below this line. But below this line were all the <script> includes required for jQuery UI - so those simply weren't getting loaded at all. However, jQuery's ready() event still fired, at which point your theme's JavaScript ran and immediately hit a fatal error because it depends on a jQuery UI library that never got loaded. TubePress 3.0.0 and below rely heavily on the ready() event, so any fatal error will essentially break TubePress. I'm working on a rewrite for TubePress 3.0.1 that will remove TubePress's dependency on jQuery.ready().
 

I clicked on your profile image, then clicked "Send Me a Message". At the top of the message I was creating, it said "Technical support via private messages is not permitted unless specifically requested by a TubePress Staff member."
 
Then after I entered my subject and message and clicked Send, it said "The member eric cannot receive any new messages".

 
Thanks! That should allow me to reproduce this.
 

I mean how did you know that the file that you reference, is the file where the problem lies?

 
Here's what I did:

  • Cloned the arras theme from its GitHub page to my local drive.
  • Using the command line, ran 
    grep -r "enqueue_script" *
    This allowed me to see every file and line for which the theme was calling enqueue_script().
  • Found line 47 of widgets.php, where the theme had enqueued jQuery UI

I like getting code onto my local machine so I can search through it quickly!

 

Feel free to experiment to make sure that indeed it's fixed. And also feel free to delete my temporary account on your site. Thanks!

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 03 February 2013 - 12:49 PM

Hi, I have found similiar posts but none of the solutions fit my situation. The pagination works and the first video will play, but clicking on other video titles or thumbnails does not do anything.

 

Thank You!



#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 03 February 2013 - 03:25 PM

Hi,
 
It looks like you have a few JavaScript errors on page load that are preventing TubePress from initializing itself correctly. Screenshot: http://i.imgur.com/mqWN7sN.png.
 
The problem in your case is that your theme is loading jQuery UI's tabs library at the very bottom of the HTML source:
 

<script type='text/javascript' src='http://www.oboysports.com/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js?ver=1.9.2'></script>
</body>
</html>

 
But up near the top of the HTML source, your theme is trying to use the library:
 

$('.multi-sidebar').tabs();

 
So the solution is to simply move the <script> element to much higher in the page to somewhere before line 64. Do you happen to know how it got moved down to the footer?



#3 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 07 February 2013 - 07:54 PM

Hi, wow thanks I didn't know that you had replied, I thought I would get an email and hadn't checked back here yet!

Which file are you referring to, when you say to move the <script> element? I don't know how it got moved..

Thanks again,

Ken



#4 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 08 February 2013 - 06:19 PM

Hi Ken,

Without looking through your site's source code it's difficult to say exactly how the <script> elements got moved to the bottom of the page. But it's either one of your plugins or your theme, that much is for sure. The quickest way to identify this is probably to

  1. Switch to WordPress's "twentytwelve" theme. If the <script> is still at the bottom, switch back to your normal theme and go to step 2.
     
  2. Disable your plugins, one by one, until the <script> load moves from the bottom of the page to the top.

Tedious, I know, but effective. What do you think?



#5 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 09 February 2013 - 12:11 AM

It is the Theme, so now I need to determine what in the theme is causing the issue. Would this mean that it is a theme file, or maybe a widget, and definitely not a plugin? The site belongs to a customer who has done some editing, using text/html widgets for ads and also adding some ad code to some of the page templates.

Much appreciated..

#6 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 09 February 2013 - 06:54 PM

Hi Ken,
 
If switching the theme moved the <script> elements back to the top of the HTML source, I think we can rule out interference from any other plugins. I'm also comfortable ruling out a widget as the cause.
 
It looks like this theme in use on your site is Arras. It's open source, so I went in to see where it loaded the jQuery UI scripts and found it on line 47 of wp-content/themes/arras/library/widgets.php:
wp_enqueue_script( 'jquery-ui-tabs', null, array( 'jquery-ui-core', 'jquery' ), null, false );
What's weird is that the theme, at least the version on GitHub, is explicitly saying that the scripts should not be loaded at the bottom of the page. That's what the "false" argument means. Could you verify that this line in your theme matches what's shown above? i.e. I want to make sure that nobody was modified the theme's source.
 
Alternatively, I'll be happy to take a look around for you. I would just need a set of credentials to log in to your WordPress installation. Feel free to send me a private message via the forum here if you'd like to go that route.
 
We'll get this figured out!

#7 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 09 February 2013 - 07:52 PM

Hi, I tried to PM you some login info but it said that you cannot receive private messages... I would like to send it though.

 

I do use the Arras theme, but I have a Child Theme called Auto-Magic-Content-Robot which is loaded. However, if I load the Arras theme itself the issue is not resolved so it must be in the Arras theme, not my child theme.


I could not tell which file to look at, to find that line, unless you meant the source view? I would like to understand how you are determining where to look, as I am a beginning developer.



#8 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 10 February 2013 - 03:48 PM

I tried to PM you some login info but it said that you cannot receive private messages... I would like to send it though.

 
Did you see a specific error message? I should be able to receive private messages, so I'm wondering if something on the forum here is misconfigured. What steps did you take to try to send the message?
 
I'll send you a message via the forum and hopefully you can simply reply to that!
 
 

I could not tell which file to look at, to find that line, unless you meant the source view? I would like to understand how you are determining where to look, as I am a beginning developer.

 
The file should be located at wp-content/themes/arras/library/widgets.php inside your WordPress installation. You should be able to view this file using an FTP client or however you uploaded WordPress to your server (cPanel, etc). You should also be able to view the file from the WordPress admin area by visiting WP Admin > Appearance > Editor. Does that make sense?



#9 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 10 February 2013 - 07:13 PM

Did you see a specific error message? I should be able to receive private messages, so I'm wondering if something on the forum here is misconfigured. What steps did you take to try to send the message?
 
I'll send you a message via the forum and hopefully you can simply reply to that!

 
I clicked on your profile image, then clicked "Send Me a Message". At the top of the message I was creating, it said "Technical support via private messages is not permitted unless specifically requested by a TubePress Staff member."

 

Then after I entered my subject and message and clicked Send, it said "The member eric cannot receive any new messages".
 
I received your message from the forum, or at least the notification is in my email, so I will reply to the message.
 

The file should be located at wp-content/themes/arras/library/widgets.php inside your WordPress installation. You should be able to view this file using an FTP client or however you uploaded WordPress to your server (cPanel, etc). You should also be able to view the file from the WordPress admin area by visiting WP Admin > Appearance > Editor. Does that make sense?

 
Thank you, I mean how did you know that the file that you reference, is the file where the problem lies?
 
Much appreciated Eric!!



#10 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 10 February 2013 - 08:31 PM   Best Answer

Fixed! Your initial hunch was correct - the cause of the problem was a malformed <iframe> embed in some of the advertising code. Specifically, it was the middle widget of Footer Sidebar #4 widget area. It looked like this

<iframe src="http://rcm.amazon.com/e/cm?t=oboysports-20&o=1&p=21&l=ur1&category=shorts&banner=0Q6KW3RZAZTTW5085702&f=ifr" width="125" height="125" scrolling="no" border="0" marginwidth="0" style="border:none;"

 
So I fixed it to make it look like this:

<iframe src="http://rcm.amazon.com/e/cm?t=oboysports-20&o=1&p=21&l=ur1&category=shorts&banner=0Q6KW3RZAZTTW5085702&f=ifr" width="125" height="125" scrolling="no" border="0" marginwidth="0" style="border:none;"></iframe>

 
So how did that break TubePress? The malformed HTML caused the web browser to ignore any HTML below this line. But below this line were all the <script> includes required for jQuery UI - so those simply weren't getting loaded at all. However, jQuery's ready() event still fired, at which point your theme's JavaScript ran and immediately hit a fatal error because it depends on a jQuery UI library that never got loaded. TubePress 3.0.0 and below rely heavily on the ready() event, so any fatal error will essentially break TubePress. I'm working on a rewrite for TubePress 3.0.1 that will remove TubePress's dependency on jQuery.ready().
 

I clicked on your profile image, then clicked "Send Me a Message". At the top of the message I was creating, it said "Technical support via private messages is not permitted unless specifically requested by a TubePress Staff member."
 
Then after I entered my subject and message and clicked Send, it said "The member eric cannot receive any new messages".

 
Thanks! That should allow me to reproduce this.
 

I mean how did you know that the file that you reference, is the file where the problem lies?

 
Here's what I did:

  • Cloned the arras theme from its GitHub page to my local drive.
  • Using the command line, ran 
    grep -r "enqueue_script" *
    This allowed me to see every file and line for which the theme was calling enqueue_script().
  • Found line 47 of widgets.php, where the theme had enqueued jQuery UI

I like getting code onto my local machine so I can search through it quickly!

 

Feel free to experiment to make sure that indeed it's fixed. And also feel free to delete my temporary account on your site. Thanks!



#11 Ken Soszka

Ken Soszka

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 11 February 2013 - 12:09 PM

Thank you Eric! Yes, everything is working now. Thanks for findind it, fixing it, and explaing it to me as I now have some new knowledge and some cool tools to add to my arsenal.

 

Good luck on the development of your new version, looking forward to that.

 

Best Regards,

Ken



#12 Kevin Brown

Kevin Brown

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 13 February 2013 - 07:07 PM

Hey guys, I'm having the same problem that Ken was having, but my case seems different.  Can you help troubleshoot?

 

http://www2.nebraska...ubepress_page=1

 

Thanks for any help.

 

Kevin