Not signed in (Sign In)

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

    • CommentAuthorrendeto
    • CommentTimeMay 28th 2009
     
    Hi.
    I use the latest SVN (598) for my gallery and I have only one collection. I applied the fix for removing collection name from URL described in this topic. It seemed to work great but now I notice that trying to search returns 404 error and feeds are empty. Except for collection level which is now the feed for the entire gallery.

    My gallery is here: http://rendeto.info/gallery/

    I tried overwriting my install with the original files and still no good. Only that doing this broke the links to the albums. I assume that the fix changed the path where images are stored and didn't change the original search and RSS URLs. I can not fix it on my own, though.
    Any help is appreciated.
    • CommentAuthorrendeto
    • CommentTimeJun 1st 2009
     
    Is there a chance I get some help here to make this work?
    I'm stuck :-|
    •  
      CommentAuthorsidtheduck
    • CommentTimeJun 3rd 2009
     
    rendeto,

    Sorry it took awhile to get back to you, but it's been hectic lately and I haven't had time to dive into the code. However, I found some time last night and I believe I have a solution for you.

    Search:
    Instead of this code:
    $resolved_path = resolve_path("your_collection_folder_name/".$path);
    Change it to read:
    if (strpos($path, 'search/') === false) {
    $resolved_path = resolve_path("your_collection_folder_name/".$path);
    } else {
    $resolved_path = resolve_path($path);
    }


    RSS:
    There's a resolved_path() portion of code in the RSS feed as well, just replace it the same as the above code.
    • CommentAuthorrendeto
    • CommentTimeJun 3rd 2009
     
    Hi Sid,

    Thanks for your time and trying to help. I just tried replacing the code as you say and somehow it doesn't seem to work. I still get 404 error. We're talking about the line in plogger.php I changed previously according to the fix, right? Have in mind my zero PHP knowledge. I think I won't cope with the RSS on my own, too.

    Regards
    •  
      CommentAuthorsidtheduck
    • CommentTimeJun 3rd 2009 edited
     
    Sorry about that, rendeto.

    You are correct to edit this is plogger.php (and in plog-rss.php for the rss feed). I just checked and the ending slash is not present in the $path string so the code should read like this:
    if (strpos($path, 'search') === false) {
    $resolved_path = resolve_path("your_collection_folder_name/".$path);
    } else {
    $resolved_path = resolve_path($path);
    }

    or you can try this:
    if ($path == 'search') {
    $resolved_path = resolve_path($path);
    } else {
    $resolved_path = resolve_path("your_collection_folder_name/".$path);
    }
    • CommentAuthorrendeto
    • CommentTimeJun 3rd 2009
     
    Some progress here. Trying with the first portion of code returns the search page but with no images found and the following remarks:

    Notice: Undefined index: searchterms in plog-functions.php on line 99
    Notice: Undefined index: searchterms in plog-functions.php on line 1566

    Same with the second part. Only that it had an extra '.' which at first gave me a parsing error.
    • CommentAuthorrendeto
    • CommentTimeJun 3rd 2009
     
    Update:

    RSS works just fine. :)
    •  
      CommentAuthorsidtheduck
    • CommentTimeJun 3rd 2009
     
    Posted By: rendetoSome progress here. Trying with the first portion of code returns the search page but with no images found and the following remarks:

    Notice: Undefined index: searchterms in plog-functions.php on line 99
    Notice: Undefined index: searchterms in plog-functions.php on line 1566

    Same with the second part. Only that it had an extra '.' which at first gave me a parsing error.
    I guess there is a bug in the new code. In 'plogger.php' find the following code (just above the resolved_path stuff)
    $path = join('/', array_diff(explode('/', $_REQUEST['path']), explode('/', $_SERVER['PHP_SELF'])));
    and change it to read:
    $path = join('/', array_diff(explode('/', $_SERVER['REQUEST_URI']), explode('/', $_SERVER['PHP_SELF'])));

    That should clear up the notices.
    • CommentAuthorrendeto
    • CommentTimeJun 3rd 2009
     
    I changed this and I'm back where I started - 404 error.
    Probably I have to leave that line as is and try to change something in 'plog-functions.php'. The notices were in search case of breadcrumbs generation and this part of plog_init()
    if ($GLOBALS['plogger_level'] == 'search') {
    plogger_init_search(array(
    'searchterms' => $_REQUEST['searchterms'],
    'from' => $from,
    'limit' => $lim
    ));
    }
    •  
      CommentAuthorsidtheduck
    • CommentTimeJun 3rd 2009
     
    Weird. I tested that on my server and had no errors.

    And yes, that is where the notice is coming from, but that just means that the searchterms variable is not being passed to Plogger, so if you do a search for something that you KNOW should show up, nothing will show up still.

    Try copy / pasting the code from my last post just to make sure there are no syntax errors (I just double-checked it).
    • CommentAuthorrendeto
    • CommentTimeJun 4th 2009
     
    Yes, it works now! I tried it on a different PC and it's OK. Sorry about not seeing this before. Probably I had some bad browser caching.

    Thanks a lot for your time and effort and keep up the good work with Plogger!