
Cannot play video
Started by Dan Mau, Jun 05 2011 11:37 AM
19 replies to this topic
#1
Posted 05 June 2011 - 11:37 AM
Hi, I cannot play any video on my site using tubepress. http://danielmau.com...-video-gallery/ The videos won't play when I clicked on them. When I use playerLocation="popup", the address is about:Blank and there is nothing on the page. I am using the latest version of Wordpress and Tubepress 2.2.5. I have tried to disable all the plugins and use the twentyten theme but I still couldn't play the video. I have tried reinstalling and it's still not working. I have looked at the error console and there doesn't seems to be any JS errors. Please help. Thanks!
#2
Posted 06 June 2011 - 01:03 AM
Thank you for helping to test the latest version! I am very interested in fixing your gallery, but the page wouldn't load after trying for quite a while. Is the site still up? Let me know and I'll be very eager to help. Thanks!
#3
Posted 06 June 2011 - 02:00 PM
Hi Eric,
Thanks for the quick reply! I just checked it and the site is still up. Thanks!
Thanks for the quick reply! I just checked it and the site is still up. Thanks!
#4
Posted 08 June 2011 - 12:59 AM
I finally was able to load your site - definitely some sort of network problem on my end. Sorry for the delay.
Anyway, you've spotted a bug! I left some development code in a file. Would you be willing/able to help me test the fix? You'll just need to replace the contents of tubepress/sys/scripts/ajax/playerHtml.php with this file: https://gist.github.com/1013860. That should take care of the issue. If you can confirm the fix then I'll release a second release candidate.
Thanks again! Couldn't do this without brave souls like yourself ;)
Anyway, you've spotted a bug! I left some development code in a file. Would you be willing/able to help me test the fix? You'll just need to replace the contents of tubepress/sys/scripts/ajax/playerHtml.php with this file: https://gist.github.com/1013860. That should take care of the issue. If you can confirm the fix then I'll release a second release candidate.
Thanks again! Couldn't do this without brave souls like yourself ;)
#5
Posted 08 June 2011 - 03:53 PM
Glad I can help. :) I've uploaded the new file, and the problem is still there. I've install a fresh copy of wordpress on another part of the site and tried it again, but the video is still not playing. http://danielmau.com/?page_id=5
#6
Posted 08 June 2011 - 10:14 PM
Looks like there might have been a problem when copying in the new file. The error message I'm seeing (with Firebug) is
syntax error, unexpected T_STRING in /home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php on line 1Could you verify and/or post the contents of /home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php here to make sure that it's OK? Thanks!
#7
Posted 08 June 2011 - 11:12 PM
<?php /** * Copyright 2006 - 2011 Eric D. Hough (http://ehough.com) * * This file is part of TubePress (http://tubepress.org) * * TubePress is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * TubePress is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with TubePress. If not, see <http://www.gnu.org/licenses/>. */ /** * Handles generation of the HTML for an embedded player. This expects exactly 3 GET * paramters: embedName (the string name of the embedded player implementation), * video (the video ID to load), meta (true/false whether or not to include video meta info) */ class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../../classes/org/tubepress/impl/classloader/ClassLoader.class.php'; org_tubepress_impl_classloader_ClassLoader::loadClasses(array( 'org_tubepress_api_const_ExecutionContextVariables', 'org_tubepress_api_querystring_QueryStringService', 'org_tubepress_impl_ioc_IocContainer' )); $ioc = org_tubepress_impl_ioc_IocContainer::getInstance(); $env = $ioc->get('org_tubepress_api_environment_Detector'); if ($env->isWordPress()) { $fs = $ioc->get('org_tubepress_api_filesystem_Explorer'); $base = $fs->getTubePressBaseInstallationPath(); include $base . '/../../../wp-blog-header.php'; } $booter = $ioc->get('org_tubepress_api_bootstrap_Bootstrapper'); $context = $ioc->get('org_tubepress_api_exec_ExecutionContext'); $player = $ioc->get('org_tubepress_api_player_PlayerHtmlGenerator'); $provider = $ioc->get('org_tubepress_api_provider_Provider'); $qss = $ioc->get('org_tubepress_api_querystring_QueryStringService'); $sp = $ioc->get('org_tubepress_api_shortcode_ShortcodeParser'); /* boot TubePress */ $booter->boot(); $shortcode = rawurldecode($qss->getShortcode($_GET)); $videoId = $qss->getCustomVideo($_GET); $galleryId = $qss->getGalleryId($_GET); /* gather up the options */ $sp->parse($shortcode); if ($context->get(org_tubepress_api_const_options_names_Embedded::LAZYPLAY)) { $context->set(org_tubepress_api_const_options_names_Embedded::AUTOPLAY, true); } $context->set(org_tubepress_api_const_ExecutionContextVariables::GALLERY_ID, $galleryId); /* grab the video! */ try { $video = $provider->getSingleVideo($videoId); } catch (Exception $e) { header("Status: 404 Not Found"); exit; } $title = rawurlencode($video->getTitle()); $html = rawurlencode($player->getHtml($video)); echo "{ \"title\" : \"$title\", \"html\" : \"$html\" }";
#8
Posted 08 June 2011 - 11:29 PM
I have uploaded the file again and it seems to work now. I have made some changes with my hosting account so maybe some problems occured while I upload my file before. Thank you so much for your help!
#9
Posted 09 June 2011 - 11:23 AM
Thank you! I've published RC2 here: http://tubepress.goo.../t..._5_RC2.zip, which includes just this change. Expect a final release next week.
#10
Posted 11 June 2011 - 02:14 AM
Hi Eric,
I have just make some changes to the site and now I am experiencing the same error. Well, almost the same. I couldn't play the video and when I looked at it in the web console, I found the status is HTTP/1.1 404 Not Found when I clicked on the video. I have tried to upload the the RC2 and playerHtml.php several times and it's not working. This is the new site: http://danielmau.com/video/. Thanks!
I have just make some changes to the site and now I am experiencing the same error. Well, almost the same. I couldn't play the video and when I looked at it in the web console, I found the status is HTTP/1.1 404 Not Found when I clicked on the video. I have tried to upload the the RC2 and playerHtml.php several times and it's not working. This is the new site: http://danielmau.com/video/. Thanks!
#11
Posted 20 June 2011 - 05:05 PM
Looks like another bug! Try replacing your playerHtml.php with this one: https://gist.github.com/1036716. That should fix it. Let us know!
#12
Posted 21 June 2011 - 09:56 AM
Hi Eric,
I have just uploaded the file and it is not working. Just to make sure I haven't upload the wrong file, this is the file that I uploaded:
And this is the response that I get when I tried to click on the video.
I have just uploaded the file and it is not working. Just to make sure I haven't upload the wrong file, this is the file that I uploaded:
<?php /** * Copyright 2006 - 2011 Eric D. Hough (http://ehough.com) * * This file is part of TubePress (http://tubepress.org) * * TubePress is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * TubePress is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with TubePress. If not, see <http://www.gnu.org/licenses/>. */ /** * Handles generation of the HTML for an embedded player. This expects exactly 3 GET * paramters: embedName (the string name of the embedded player implementation), * video (the video ID to load), meta (true/false whether or not to include video meta info) */ class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../../classes/org/tubepress/impl/classloader/ClassLoader.class.php'; org_tubepress_impl_classloader_ClassLoader::loadClasses(array( 'org_tubepress_api_const_ExecutionContextVariables', 'org_tubepress_api_querystring_QueryStringService', 'org_tubepress_impl_ioc_IocContainer' )); require dirname(__FILE__) . '/../wordpress/loader.php'; /* boot TubePress */ $booter = $ioc->get('org_tubepress_api_bootstrap_Bootstrapper'); $booter->boot(); $context = $ioc->get('org_tubepress_api_exec_ExecutionContext'); $player = $ioc->get('org_tubepress_api_player_PlayerHtmlGenerator'); $provider = $ioc->get('org_tubepress_api_provider_Provider'); $qss = $ioc->get('org_tubepress_api_querystring_QueryStringService'); $sp = $ioc->get('org_tubepress_api_shortcode_ShortcodeParser'); $shortcode = rawurldecode($qss->getShortcode($_GET)); $videoId = $qss->getCustomVideo($_GET); $galleryId = $qss->getGalleryId($_GET); /* gather up the options */ $sp->parse($shortcode); if ($context->get(org_tubepress_api_const_options_names_Embedded::LAZYPLAY)) { $context->set(org_tubepress_api_const_options_names_Embedded::AUTOPLAY, true); } $context->set(org_tubepress_api_const_ExecutionContextVariables::GALLERY_ID, $galleryId); /* grab the video! */ try { $video = $provider->getSingleVideo($videoId); } catch (Exception $e) { header("Status: 404 Not Found"); exit; } $title = rawurlencode($video->getTitle()); $html = rawurlencode($player->getHtml($video)); header('HTTP/1.1 200 OK'); echo "{ \"title\" : \"$title\", \"html\" : \"$html\" }";
And this is the response that I get when I tried to click on the video.
<b>Warning</b>: require(/home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/../wordpress/loader.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in <b>/home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php</b> on line <b>32</b> <b>Fatal error</b>: require() [<a href='function.require'>function.require</a>]: Failed opening required '/home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/../wordpress/loader.php' (include_path='.:/usr/local/php5/lib/php') in <b>/home/content/52/7875052/html/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php</b> on line <b>32</b>
#13
Posted 23 June 2011 - 06:05 PM
Just posted a new release candidate that fixes this bug (among a bunch of other bugs found during testing). viewtopic.php?f=6&t=575
Let me know how that works for you. Thanks!
Let me know how that works for you. Thanks!
#14
Posted 24 June 2011 - 12:58 AM
Hi Eric,
I've just uploaded the new RC and it's still not working. When I click on the thumbnail, nothing happens. The error I get from Firebug is
Thanks!
I've just uploaded the new RC and it's still not working. When I click on the thumbnail, nothing happens. The error I get from Firebug is
b[k] is undefined http://danielmau.com/wp-content/plugins/tubepress/sys/ui/static/js/tubepress.js?ver=3.1.3 Line 1
Thanks!
#15
Posted 24 June 2011 - 10:02 AM
Strange. I've been testing this version heavily and haven't seen that one yet. Here's what we can do to debug - in sys/ui/static/js you should have two files:
- tubepress.js (which is the one actively loaded)
- tubepress-dev.js
#16
Posted 24 June 2011 - 10:26 AM
Hi Eric,
I've just swapped the file and this is the error:
I've just swapped the file and this is the error:
galleries[galleryId] is undefined http://danielmau.com/wp-content/plugins/tubepress/sys/ui/static/js/tubepress.js?ver=3.1.3 Line 148
#17
Posted 25 June 2011 - 09:14 PM
I'm still trying to figure out how I missed this bug during my testing. But here's what you can do to get working again. Replace your existing sys/classes/org/tubepress/impl/plugin/filters/gallerytemplate/EmbeddedPlayerName.class.php with this one: https://gist.github.com/1047145
Couldn't have done this without you! Let me know how this fix works for you. Thanks again.
Couldn't have done this without you! Let me know how this fix works for you. Thanks again.
#18
Posted 26 June 2011 - 09:34 AM
Hi Eric,
I've just replaced the file and it's now returning a page with a black background and an undefined title. Thanks!
I've just replaced the file and it's now returning a page with a black background and an undefined title. Thanks!
#19
Posted 26 June 2011 - 06:14 PM
I finally realized why I wasn't seen the bugs you were seeing. I'm embarrassed to say that I was testing the wrong copy of the code! Ugh.
Anyway here's a fresh copy that does indeed work. http://www.sendspace.com/file/xbmopr
Stand by for a final release shortly!
Anyway here's a fresh copy that does indeed work. http://www.sendspace.com/file/xbmopr
Stand by for a final release shortly!
#20
Posted 27 June 2011 - 01:45 AM
Hi Eric,
It happens. I've done that sometimes too! Thanks, it works nicely!
It happens. I've done that sometimes too! Thanks, it works nicely!