Search function not working online on a specific theme

I've been searching for days, checking all the options, comparing the sources, etc. and could not find the solution:
- on my local computer, every search and dynamic album work fine, whatever theme I use
- online, it works fine also, except with my own theme: the search function (or the dynamic album) returns the thumbnails array, but when I click on one of the thumbnail, it's the corresponding physical album page that is displayed instead of staying in search mode to navigate through the search results.

It's not a cookie problem, as it works fine with other themes.
Can't see how it could be a theme coding issue, as I use the same sources on both online and local site.
I've compared all the gallery and theme options of both sites...

Apart from different versions of PHP (5.4.6 vs 5.4.9) and MySQL (5.0.90 vs 5.5.28) I cannot see any difference between the two installations.

There might be some context parameter or whatever that might go AWOL when certain conditions are met, but I don't know what to seek for.

Could somebody give me some clue, so I can make some progress in the right direction?

Thanks for helping.

Comments

  • Just in case someone would like to try the online gallery (still in development) here is the link: http://www.marie-noelle-augendre.com/zenphoto/
    'Portfolio' in the menu is a dynamic album, or you can try any kind of search, or the tags list (tab in the bottom of most screens)
  • With the current releases there is a discontinuity between an image and its "album". The link to an acutal image uses the real album name and image name, so the dynamic album is disassociated with the image at that point

    Much of Zenphoto is aware of this issue and compensates. (For instance breadcrumbs.) but there are still ways you can get to the image bypassing these compensations.

    This is something that we are working to fix, but those changes are in the 1.4.5 development stream and may not be complete yet.

    We welcome your trying this development branch and providing your feeback. It is available as the1.4.5 branch on GitHub. Please see if that branch resolves your problems.
  • acrylian Administrator, Developer
    As a workaround for the current release it would also be possible to attach a query containing the dynamic album name to the url to manually setup the dynamic album context.
  • I installed the 1.4.5 branch on my local gallery and did some tests.

    I first noticed something curious with the zmMasonry (it's the theme I started from to develop my own) : when browsing a dynamic album or a search results, the navigation is OK when I use the previous/next links in the sidebar (image page), but there is something wrong with the thumbnails (paged_thumbs_nav) under the image:
    - when in a search, the thumbnails are those of the physical album the picture belongs to
    - when in a dynamic album, the thumbnails are displayed OK, but as soon as you use the next/prev arrows to navigate through the thumbnails, you're back to the physical album of the current picture.

    Same problem with the ZenPage theme when using a dynamic album, but I couldn't try the search are the tags are not displayed anywhere, and the search function returns nothing whatever I tried.
    Other themes are fine, as they don't use this feature.

    So the problem seems to be related to the page_thumbs_nav feature, and it remains in the 1.4.5 branch.

    acrylian, could you give some details about what have to be done to make that workaround? What should be added to the URL, and how?

    Thanks for your help.
  • acrylian Administrator, Developer
    I am not familiar with the 1.4.5 changes in detail, but in any case image of an dynamic album remain in their real album. Even the url reflects that (unless that has been changed in 1.4.5). There needs a context to be set.

    I am not familiar with zpMasonry and how it uses paged_thumbs_nav. Might be that that plugin misses support for dynamic albums at all. Haven't looked at it in ages actually.

    The workaround I spoke of is a bit more complicated. You can technially setup the album context as with any other album using:
    `
    $albobj = new Album(NULL,'');
    makeAlbumCurrent($albobj);
    `
    I have not tried this on image.php directly when coming from a link. You might have to visit the album.php page of that album first to set the context correctly.

    But you would have to add something like "dynalb=<your dynamic album>" to the url so you know the album to setup.
Sign In or Register to comment.