Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorwottenad
    • CommentTimeJan 2nd 2010
     
    I'm using Plogger RC1 at "www DOT adcmobile DOT com/plogger/" and have a problem with search that is driving me banannas: I am cataloging all of our car stereo installations, and need to be able to search for particular year and make/model to narrow down results, for instance "2010 Prius" so as to find images taken of installations in the 2010 Prius. Sounds simple, but no matter what method I use (and I've been through every post here regarding multiple keyword searching), I cannot get search to return ONLY "2010 Prius" images! It will always return ALL images that have EITHER "2010" OR "Prius". I've not modified the search functionality from stock (I don't believe, anyway), but none of the methods others use has any effect on my database.

    Any ideas?

    Walt
    •  
      CommentAuthorsidtheduck
    • CommentTimeJan 7th 2010
     
    wottenad,

    Have you tried entering the search words connected by a '+' sign? (i.e. "search+word" should result in results with both "search" and "word" in them.
    • CommentAuthorwottenad
    • CommentTimeJan 7th 2010
     
    Yes - I've tried all of the combinations you've mentioned in all the postings related to search and none of them work correctly from the search box. Try this (I know about the escape characters for "+", but it doesn't make any difference):

    "https://adcmobile.com/plogger/index.php?searchterms=2010+highlander&level=search" or "https://adcmobile.com/plogger/index.php?searchterms=2010+%252B+highlander&level=search" and you'll get back all images that contain "EITHER" 2010 "OR" Highlander, but NOT "2010 Highlander"

    I'm stumped...

    Walt
    •  
      CommentAuthorsidtheduck
    • CommentTimeJan 7th 2010
     
    wottenad,

    For some reason your server is URL encoding the already URL encoded information. The correct search URL should be "https://adcmobile.com/plogger/index.php?searchterms=2010%2BHighlander&level=search", but your server is running that through another URL encoding and rendering the "%2B" (which is URL encoding for the '+' sign) into "%252B" (which is the URL encoding for '%2B'). So, my search URL on your site would be rendered as "https://adcmobile.com/plogger/index.php?searchterms=2010%252BHighlander&level=search" which does not find anything as it is looking for the text "2010%2BHighlander" in the descriptions. The additional '+' signs on your link above mean that you are searching for "2010 %2B Highlander" and with the spaces between means it's looking for "2010" OR "%2B" OR "Highlander" in the text.

    Are you doing a rewrite to force the secure https: protocol or doing any other redirection?
    • CommentAuthorwottenad
    • CommentTimeJan 7th 2010
     
    Thanks for the quick response! I've not done any redirects or other modifications to the script at all - in fact, I just upgraded to RC1 to try and alleviate the problem. I am using a slightly modified "Broadway" theme, but that involved only a few changes to CSS & a couple graphics. If you have a known good script that I can replace for search, you can email it to waltATadcmobileDOTcom, or if there is any other logging I can do to find out where the request gets modified, I'll investigate it.

    Is there another working installation that you can direct me to that I can compare search terms and performance?

    Thanks again for the help - I really love this program and have suggested it to numerous manufacturers for their own use.

    Walt
    •  
      CommentAuthorsidtheduck
    • CommentTimeJan 7th 2010
     
    wottenad,

    You can opening plog-includes/plog-functions.php file and look for the plogger_init_search() function (should be around line 1943):
    function plogger_init_search($arr) {
    global $PLOGGER_DBH;

    and add this line right after the $PLOGGER_DBH line:
    $arr['searchterms'] = urldecode(urldecode($arr['searchterms']));
    • CommentAuthorwottenad
    • CommentTimeJan 7th 2010
     
    Added the code and still no luck, unless you can get results from it that I can't. It still returns the same "2010%252BHighlander" in the search results. Here's rows 1943-1948 from plog-functions.php as it now exists:

    function plogger_init_search($arr) {
    global $PLOGGER_DBH;
    $arr['searchterms'] = urldecode(urldecode($arr['searchterms']));
    $terms = explode(' ', $arr['searchterms']);
    $from = 0;
    $limit = 20;

    Is there a way to strip only the "52" from the search result leaving "%2B", or is there anything specific that needs to defined to work on a secure site?

    Walt
    •  
      CommentAuthorsidtheduck
    • CommentTimeJan 8th 2010
     
    okay, what about just one of the urldecodes? Like this:
    $arr['searchterms'] = urldecode($arr['searchterms']);
    And if that doesn't work, try this:
    $arr['searchterms'] = str_replace('%25', '%', $arr['searchterms']);
    • CommentAuthorwottenad
    • CommentTimeJan 21st 2010
     
    Sorry for the delay (I attended CES in Vegas), but neither fix works:

    If I search for "2010+Prius" (of which there are DOZENS of images that match), I get NO RESULTS, (and we still get %252 returned in the address bar of the browser, but the status on the searchbar in Plogger shows we searched for %2B and got no results):

    Browser address bar result: https://adcmobile.com/plogger/index.php?searchterms=2010%252BPrius&level=search
    Plogger search results: Installations » Search » You searched for 2010%2BPrius.

    Weird!

    Here's the entire section starting at Line 1943:

    function plogger_init_search($arr) {
    global $PLOGGER_DBH;
    $arr['searchterms'] = str_replace('%25', '%', $arr['searchterms']); - (or alternatively) $arr['searchterms'] = urldecode($arr['searchterms']);
    $terms = explode(' ', $arr['searchterms']);
    $from = 0;
    $limit = 20;

    Also, (and this problem has existed for a number of months), after about the second or third search in a row, the searches are locking up and making my entire site time out! Literally, the entire site goes down until the searches time out (I'm guessing). Any ideas on any of that stuff? I may have to remove the whole Plogger install if it continues (and that's gonna kill me...) :- (

    Walt