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

Tubepress & Wpml (ajax?) Issue

youtube thumbnails wordpress

Best Answer eric, 04 March 2014 - 02:46 PM

This fix will be included in the next TubePress release.

Go to the full post


  • Please log in to reply
10 replies to this topic

#1 furio

furio

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 01 February 2014 - 05:30 PM

I seem to be having an issue that I've noticed others have been experiencing. When you start the first video that appears on my videos page, everything plays fine. However, when you click on a thumbnail, the video area gets greyed out and the new video doesn't load.

 

After doing some research on the forum, I realize that this is likely due to the site address and the AJAX request URL not matching up. However, one of my problems is that I am running a multi-language site using WPML and am using separate domains for each language. As a result, Tubepress works fine in English but not in French (strangely enough, the issue only came up recently). I tried to go through the troubleshooting guide but not sure if the suggestions there can be applied to my site's setup.

 

Anyway, you can check out my site's video page here: http://bit.ly/1bO22Xl. Any help would be greatly appreciated. Thanks!



#2 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 06 February 2014 - 01:04 AM

Hi furio,

 

Unfortunately, the link that you provided does not function properly. It states that the domain can not be found.

 

Please either post a working link or PM it to me.

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#3 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 10 February 2014 - 08:07 PM

Hello,

 

The problem you are experiencing is caused by a Cross-Domain AJAX issue.  Please see here for what you can do to fix this problem.  http://docs.tubepres...oss-domain-ajax

 

Your domain name is: http://www.operation.....n.ca but your AJAX requests are sourcing from: http://www.operationlifesaver.ca/

 

let us know.

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#4 furio

furio

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 February 2014 - 08:28 PM

Hi Brandon,

 

Thanks for getting back to me on this (sorry for my delayed response). I understand that the domain is not the same as where the AJAX request is being sourced from. If you recall from my original message, I am using the multi-language plugin WPML and have one domain for English and a different domain for French.

 

I went through the troubleshooting docs you suggested I review but I don't really know how to fix the problem using the listed guidelines. I don't want to use any redirects as the domains need to remain as is; the site address and the Wordpress address are definitely the same; and I'm not using Tubepress Pro. So I'm a bit at a loss as to how I should go about fixing this.

 

Can you provide any additional guidance? I know a bunch of people have posted similar cross-domain AJAX issues but I can't find anyone in the same boat as me. Any help would be greatly appreciated. Thanks.



#5 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 25 February 2014 - 01:34 AM

Hi furio,

 

I have asked our lead developer if he has any input or suggestions on how to assist you.

 

Thanks for your patience!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#6 furio

furio

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 25 February 2014 - 11:25 PM

Thanks very much Brandon. I appreciate it.



#7 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 26 February 2014 - 04:56 PM

HI furio,

 

Here's a workaround that should work for you, at least until we come up with another solution:

  1. Open up the file at wp-content/plugins/tubepress/src/main/web/tubepress-dev.js with your favorite text editor.
     
  2. Change line 239 from
    return getBaseUrl() + '/src/main/web/php/' + text_ajaxEndpoint + '.php';
    

    to

    return '/wp-content/plugins/tubepress/src/main/web/php/' + text_ajaxEndpoint + '.php';
  3. Swap the contents of wp-content/plugins/tubepress/src/main/web/tubepress-dev.js and wp-content/plugins/tubepress/src/main/web/tubepress-dev.js

This should (might?) trick TubePress into using whichever domain the user is using, and thus skirt the cross-domain issue. I haven't tested this solution, but I'm confident it should work. Give it a try and let us know? Thanks!



#8 furio

furio

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 27 February 2014 - 09:06 PM

Thanks very much Eric for the fix. I'll give it a try ASAP. However, just to clarify, in step 3 you mention:

 

 

 

3. Swap the contents of wp-content/plugins/tubepress/src/main/web/tubepress-dev.js and wp-content/plugins/tubepress/src/main/web/tubepress-dev.js

 

Is it safe to assume you meant to say that I should swap the contents of tubpress-dev.js and tubepress.js

 

Thanks again.



#9 furio

furio

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 27 February 2014 - 09:49 PM

I just went ahead and tried it anyway and it looks like it worked! Awesome.

 

Thanks again for the help Eric/Brandon. Just to confirm one last thing though—if there is a Tubepress update in the future, will this file be overwritten?



#10 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 28 February 2014 - 02:38 PM

I just went ahead and tried it anyway and it looks like it worked! Awesome.

 

Thanks again for the help Eric/Brandon. Just to confirm one last thing though—if there is a Tubepress update in the future, will this file be overwritten?

 

Fantastic!

 

For the moment, you'll have to redo this change when you upgrade TubePress. But since this worked so easily, I'd like to incorporate it into the mainline. I'll be doing some testing this weekend to see if the change breaks anything else (which I don't believe it will).

 

I'll report back here one way or another to let you know. Thanks again for helping us test.



#11 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 04 March 2014 - 02:46 PM   Best Answer

This fix will be included in the next TubePress release.