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

Search & pagination doesn't work 2.40


  • Please log in to reply
6 replies to this topic

#1 Johnny Bravo

Johnny Bravo

    Member

  • Members
  • PipPip
  • 11 posts

Posted 03 March 2012 - 09:06 PM

Hi,
I think you got some problems with the search. output="ajaxSearchInput" seems to integrate not the search form, but the gallery. I see it on your page and on mine
Also, doesn't seem to matter if it is ajax or not.

If it matters, this is my code (page):
<center>[tubepress output="ajaxSearchInput" searchResultsDomId="#rezultate_video" searchProvider="youtube + vimeo"]</center>
<p id="rezultate_video">[tubepress resultsPerPage="5" filter_racy="strict" output="searchResults" searchProvider="youtube+vimeo" ajaxPagination="true" cacheEnabled="true" likes="false" tags="true" rating="false" mode="tag" tagValue="Romania + stiri + romani" playerLocation="fancybox" length="false" paginationAbove="true" views="false" description="true" descriptionLimit="100" paginationBelow="false" playerImplementation="longtail" thumbWidth="120" thumbHeight="90" orderBy="newest" fullscreen="true" theme="myposts"]</p>

Pagination doesn't work, either. The 1,2,3... pagination is displayed, but clicking the page link loads nothing.

#2 Johnny Bravo

Johnny Bravo

    Member

  • Members
  • PipPip
  • 11 posts

Posted 03 March 2012 - 09:14 PM

I've also tried this, without any luck (gallery displays, but not the search form):
<center>[tubepress output="ajaxSearchInput" searchResultsDomId="#rezultate_video" resultsPerPage="33" filter_racy="strict" searchProvider="youtube+vimeo" ajaxPagination="true" cacheEnabled="true" likes="false" tags="true" rating="false" mode="tag" tagValue="Romania + stiri + romani" playerLocation="fancybox" length="false" paginationAbove="true" views="false" description="true" descriptionLimit="100" paginationBelow="false" playerImplementation="longtail" thumbWidth="120" thumbHeight="90" orderBy="newest" fullscreen="true" theme="myposts"]</center>
<p id="rezultate_video"></p>


#3 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 05 March 2012 - 12:01 AM

Hi,

I just responded to another user with a similar problem on this thread. Could you try the solution I outlined there (adding "galleryId" to your shortcode) and let me know how it works for you? I'm sorry for the inconvenience!

#4 Johnny Bravo

Johnny Bravo

    Member

  • Members
  • PipPip
  • 11 posts

Posted 08 March 2012 - 03:55 AM

Now it shows the form and it displays the results... unfortunately, the pagination still doesn't work (doesn't load next page)

...later... ok, I can't find the right combination. If the search works, the pagination doesn't; when it does, the video doesn't load. I'm close, however; the only problems I have now are:
- the initial videos (see code inside the id="rezultate_video") doesn't load when clicking the thumbs.
- the search is not ajaxed since the page must refresh for the results to load (?tubepress_search=avatar)
... that on Chrome. On Firefox videos (all) don't load and the pagination doesn't work... still no ajax search

This is what I have in my Wp page now:
<center>[tubepress output="ajaxSearchInput" searchResultsDomId="#rezultate_video" searchProvider="youtube + vimeo" galleryId="222"]</center>
<p id="rezultate_video">[tubepress resultsPerPage="28" filter_racy="strict" output="searchResults" searchProvider="youtube+vimeo" ajaxPagination="true" cacheEnabled="true" likes="false" tags="true" rating="false" mode="tag" tagValue="Romania + stiri + romani" playerLocation="popup" length="false" paginationAbove="false" views="false" description="true" descriptionLimit="100" paginationBelow="true" playerImplementation="longtail" thumbWidth="120" thumbHeight="90" orderBy="newest" fullscreen="true" theme="myposts"]</p>


#5 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 11 March 2012 - 06:06 PM

I think you may have discovered a bug in TubePress (lucky you!). Here's what's happening:

When you click a thumbnail (or the Ajax-enabled pagination buttons) TubePress makes an asynchronous request to fetch the new content. Here's an example URL that it might try to fetch after you click a thumbnail:

http://atat.ro/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php?tubepress_video=_N26Ztax25A&tubepress_shortcode=%255Btubepress%2520resultsPerPage%253D%252228%2522%252C%2520filter_racy%253D%2522strict%2522%252C%2520output%253D%2522searchResults%2522%252C%2520searchProvider%253D%2522youtube%252Bvimeo%2522%252C%2520ajaxPagination%253D%25221%2522%252C%2520cacheEnabled%253D%25221%2522%252C%2520likes%253D%2522%2522%252C%2520tags%253D%25221%2522%252C%2520rating%253D%2522%2522%252C%2520mode%253D%2522tag%2522%252C%2520tagValue%253D%2522Romania%2520%252B%2520stiri%2520%252B%2520romani%2522%252C%2520playerLocation%253D%2522popup%2522%252C%2520length%253D%2522%2522%252C%2520paginationAbove%253D%2522%2522%252C%2520views%253D%2522%2522%252C%2520description%253D%25221%2522%252C%2520descriptionLimit%253D%2522100%2522%252C%2520paginationBelow%253D%25221%2522%252C%2520playerImplementation%253D%2522longtail%2522%252C%2520thumbWidth%253D%2522120%2522%252C%2520thumbHeight%253D%252290%2522%252C%2520orderBy%253D%2522newest%2522%252C%2520fullscreen%253D%25221%2522%252C%2520theme%253D%2522myposts%2522%252C%2520galleryId%253D%2522688014259%2522%252C%2520sequence%253D%2522%25270MvmT3HALWg%2527%252C%2520%2527_N26Ztax25A%2527%252C%2520%25273K3kaszbEjE%2527%252C%2520%2527HNUTyC-mDlI%2527%252C%2520%252730ErnKwRNXc%2527%252C%2520%2527XY2Vu36MXsg%2527%252C%2520%2527SqZ9-7_ooeo%2527%252C%2520%25279LF_CeRz2YA%2527%252C%2520%2527NyQFkH-nstg%2527%252C%2520%2527_f-xxmQp2Ww%2527%252C%2520%2527SQt5NjHG12M%2527%252C%2520%2527P-kvTbl4VDg%2527%252C%2520%2527ljR5ZJp4yt8%2527%252C%2520%2527pt9NXtwThDA%2527%252C%2520%2527exR1vDanU5M%2527%252C%2520%2527B1vWJqJzZnc%2527%252C%2520%2527TmeBPGCkH3k%2527%252C%2520%2527kwnNW-5e_YY%2527%252C%2520%2527ZqShrAcDlDc%2527%252C%2520%2527cwQFw8as4cQ%2527%252C%2520%2527c8dPvxZqqe4%2527%252C%2520%2527Tg1R1cUoA-k%2527%252C%2520%2527yrp3nvQ1u6g%2527%252C%2520%2527o8cnEKWDr2U%2527%252C%2520%2527SaC_okewgNA%2527%252C%2520%2527rHMu7WAEBx8%2527%252C%2520%2527E1p1Ftpf1DI%2527%252C%2520%25272msl2hb-SYQ%2527%252C%2520%2527h42pQ7BVmh8%2527%252C%2520%25273ImW5foC7jU%2527%252C%2520%2527_h1KSBK4suA%2527%252C%2520%2527ry-DAFusCj8%2527%252C%2520%2527qPKwyPDrd6U%2527%252C%2520%2527VyaV9vxh1_0%2527%252C%2520%2527dsKfTDCHmKA%2527%252C%2520%2527XigAfN6jVE8%2527%252C%2520%2527V4_IThaKqOE%2527%252C%2520%2527d-D-YXVYFyM%2527%252C%2520%2527ONvQB6bZCi0%2527%252C%2520%2527ij_ZyegT6XQ%2527%252C%2520%2527QLzwgbRj1h4%2527%252C%2520%2527VBdFukgMlS4%2527%252C%2520%2527dv6HabwD_vE%2527%252C%2520%2527rl9us98DN8M%2527%252C%2520%2527hMUWYMFfNV8%2527%252C%2520%2527P0LoRh6LLtk%2527%252C%2520%2527WZbFguQSkwo%2527%252C%2520%2527YgStQKixuos%2527%252C%2520%2527mEMFmzAfVZg%2527%252C%2520%2527VTbc8TxJqu0%2527%252C%2520%2527PTf3tBv3svg%2527%252C%2520%2527QqWBiarXuW4%2527%252C%2520%2527aISpe9nhUTU%2527%252C%2520%2527hS7TIlxxkkQ%2527%252C%2520%2527sevBzHh7Pcs%2527%252C%2520%2527SJeY8N_6Yqk%2527%252C%2520%2527fTUzT6wqy4o%2527%252C%2520%2527fPIZBaxShXI%2527%252C%2520%2527r6Dc61j8HCk%2527%252C%2520%2527gpcGLv58lek%2527%252C%2520%2527hwcs_4442BM%2527%252C%2520%2527h1xTPAJeerw%2527%252C%2520%2527fwzIz0dc08E%2527%252C%2520%2527uFMgFdZqADg%2527%252C%2520%2527MrWgg-Czlxc%2527%252C%2520%2527p3TtiJDCOkE%2527%252C%2520%2527LMwMZh-Ow6s%2527%252C%2520%2527ZvVJkjnsbro%2527%252C%2520%2527TYZBLnSYW-c%2527%252C%2520%2527EDFGGpBM2uQ%2527%252C%2520%2527U5dGIBi8Zgk%2527%252C%2520%2527PHLr3EdNstw%2527%252C%2520%2527NxmVUVKghQw%2527%252C%2520%25273dUUCHZCzVA%2527%252C%2520%2527M_XfSDRrJB8%2527%252C%2520%2527SF4Y8CRkub8%2527%252C%2520%2527yvZEAajlrQU%2527%252C%2520%2527hzntsBfSq90%2527%252C%2520%2527jHjCCcKYOVE%2527%252C%2520%25279d23DYnqWGI%2527%252C%2520%2527AaDbVqbCHvY%2527%252C%2520%2527e99MJo886gY%2527%252C%2520%2527XQ6U1DEpric%2527%252C%2520%2527z6CkkEAu-uA%2527%2522%255D
All that extra stuff appended to the URL (after the ? character) is the TubePress shortcode in use. Normally, this is all fine. But in your case this request results in an HTTP 402 error, probably because the length of the URL with its associated parameters is too long. To prove this, notice that if we grab the same URL without all the extra query parameters:

http://atat.ro/wp-content/plugins/tubepress/sys/scripts/ajax/playerHtml.php?tubepress_video=_N26Ztax25A
then we get correct output.

The solution is really for TubePress to start using HTTP POST instead of GET when making Ajax requests. I've filed a bug ticket that you can star. This will take some time to implement, but in the meantime here's a solution that should work for the time being.

  • Open up sys/classes/org/tubepress/impl/bootstrap/ProTubePressBootstrapper.class.php in 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'));
That should dramatically reduce the length of the URL used. Could you give it a try and let us know?

#6 Johnny Bravo

Johnny Bravo

    Member

  • Members
  • PipPip
  • 11 posts

Posted 12 March 2012 - 08:36 AM

I'm glad I had the chance to bring you bad news :):):)
If it helps, might be because my server has suhosin and probably this doesn't allow long URLs.
Good news is that your fix is working, it fixed the pagination and the popup videos.
For me is enough, but you should probably know that the results (when searching for videos) are still loading in a new page (ex: video-filme-trailer-muzica?tubepress_search=ajax)
Thanks for the fix!

#7 Nick Evans

Nick Evans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 25 September 2012 - 06:46 PM

This line does no exist in the free version TubePressBootstrapper.class.php

Any workaround?