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

Vimeo - Ajax search not working


  • Please log in to reply
14 replies to this topic

#1 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 20 November 2011 - 11:25 PM

Hello again:

TubePress 2.2.9 -- stand-alone ... trying to get "Vimeo" Search to work.
I can get an image gallery to display fine after a search, but whatever player I choose ("popup" or "jqmodal" ..) the player only shows an empty interface.

The Vimeo keys -- do those need to be put somewhere else, other than in the PHP page that I create the search window in?

Here is my code (I have only altered the so-called vimeoSecret and vimeoKey:

[...] 'output="ajaxSearchInput" searchResultsDomId="#fra1" descriptionLimit="40" resultsPerPage="12" views="false" ajaxPagination="true" searchProvider="vimeo" playerLocation="jqmodal" vimeoSecret="a18c133i5d75qo4" vimeoKey="2t0ed4b773c22p96e6ad7633q227f02" embeddedHeight="505" embeddedWidth="756"' [...]

Best,
Frank

#2 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 23 November 2011 - 05:57 PM

Anybody? Eric??

Best,
Frank

#3 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 23 November 2011 - 10:06 PM

Hi Frank,

Could you send along the link to your site again? I seem to have lost it! Thanks much - we'll get you squared away.

#4 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 26 November 2011 - 05:18 AM

Sorry about the delay in replying.

Here a TEST page where I only have the Vimeo Search:

http://koreaweb.ws/videos-TEST2.php


Best,
Frank

#5 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 29 November 2011 - 12:11 AM

Hi Frank,

OK, here's what I've found. When you perform a search from your site, then click on one of the results, TubePress performs an Ajax request to something like the following:

http://koreaweb.ws/v...pts/aj...%22%5D

Go ahead and click on that link and you'll see that it results in a 404. Now, if we shorten that URL to, say,

http://koreaweb.ws/v...aj...erHtml.php

you can see that it produces a valid result. This smells like a bug to me. I need to experiment a bit more to find out exactly what's going on here. Stand by... and thanks for your patience in working this out.

#6 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 01 December 2011 - 07:58 AM

Awaiting your fix, Eric. Thanks. And maybe you could also look into the reported problem of Unicode not working for Ajax searches?

Frank

#7 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 07 December 2011 - 01:56 PM

Hi Eric:

No update yet??

Regards,
Frank

#8 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 20 December 2011 - 12:43 AM

Hi Eric:

Have you had a chance to look at this issue further??

Best wishes,
Frank

#9 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 20 December 2011 - 11:31 PM

Hi Frank,

Sorry it's taken me so long to respond to this thread! I'm thinking that the issue could be with your server settings, as opposed to within TubePress. To illustrate, take for instance the request that results in a 404 on your site:

http://koreaweb.ws/v...pts/aj...%22%5D

If we make the same request on tubepress.org (just substituting the server name and TubePress install path prefix), it results in a correct response:

http://tubepress.com...lugins...%22%5D

So my guess right now is that your server config throws back a 404 when the query string goes over a certain length. Would you be able to check with your hosting provider to verify this? Thoughts?

#10 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 21 December 2011 - 12:38 AM

Hi Eric:

You sure gave me the right hint: For anyone else having this problem, this is what it is:
On this server I am running "Suhoshin" is installed for more security with PHP scripts. Apache (under Linux) itself limits the query string length to something like 4 or 8,000, and for Windows servers that is even higher. But Suhoshin, out of the box, limits it to 512 bytes. Everyone can check his/her server's settings by creating a phpinfo.php file and looking for this line in the output:
suhosin.get.max_value_length = 512
If you have server root access, then you can add the following line to "php.ini" (the above line is NOT to be found there):
suhosin.get.max_value_length = 1024
Doubling the value made my Vimeo searches and video displays work. I do not suggest to set this higher than necessary.

Thanks again, Eric!
Merry Christmas!

Frank

#11 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 21 December 2011 - 11:12 PM

Thanks for posting such a detailed workaround, Frank! I've definitely bumped up against Suhosin in the past while developing TubePress and thought that I had all the kinks worked out. Anyway, I've filed a ticket so this doesn't slip through the cracks. I should be able to come up with an elegant solution after being able to give it some attention.

Thanks again and let me know how else I can help you - or if you find more bugs :) Merry Christmas.

#12 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 22 December 2011 - 03:14 AM

Hey Eric ... one more possible limitation. But I think you already work on that for the next release? A joint search in YouTube AND Vimeo.
Since that is not possible yet. I have tried to put two search windows on the same page . See my TEST page:
http://koreaweb.ws/videos2TEST.php
(1st search window is YouTube, 2nd search window is Vimeo.)
But the OUTPUT from the FIRST search window is the Vimeo output, while the 2nd window does not generate anything.
If I change the code by pasting the Vimeo code bfore YouTube, then I still only get the Vimeo results here.

Do you have any suggestion?

Frank

#13 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 01 January 2012 - 08:02 AM

Thanks for the note, Frank. This will likely take some work to implement, so I've filed a feature request so it doesn't slip through the cracks. Please star the issue to vote for the idea and track updates.

Thanks, and Happy 2012!

#14 Frank Hoffmann

Frank Hoffmann

    Member

  • Members
  • PipPip
  • 27 posts

Posted 04 January 2012 - 09:32 AM

Eric, I was wondering if there may not be a simple solution to this -- e.g. by using a SELECT field, where a use can select either YouTube or Vimeo (with the code that you have the present release). Any suggestions for that?

Best,
Frank

#15 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 04 January 2012 - 09:40 PM

Certainly a possibility if you feel motivated to do a bit of hacking :)

You could likely use JavaScript to manipulate the form that TubePress uses to submit the search terms. Look at the HTML source for the Ajax-enabled TubePress search input. There you'll see a bit of JavaScript that handles the event of the user clicking the "Search" button. You'll see that when the user clicks "Search", TubePress will call TubePressAjax.loadAndStyle() with a specially constructed URL. That specially constructed URL has a query parameter called "shortcode" that, among other things, tells TubePress if we're searching YouTube or Vimeo. You could probably dynamically edit that URL to show YouTube or Vimeo results, based on what the user has selected in some other dropdown. It's tricky and a little hacky, but it might get the job done without an extreme amount of effort.