Breadcrumb navigation in conjunction with search

If a search result needs 2 or more pages to display all the images and I click on an image from the 2nd page, the picture is shown correctly. But if I click on the subalbum (in breadcrumb navigation) afterwards which contains that image, its path is wrong and leads to a not existing page. The wrong path looks like this:

www.domain.com/zenphoto/subalbum/page/2

instead of:

www.domain.com/zenphoto/subalbum/

Comments

  • acrylian Administrator, Developer
    Damn htaccess, your are right again...that happens if you focus on one problem and forget to check related things. I am really sorry, I will look into that later.
  • I am not really sure, if changeset 1040 should address this issue, because it's still there.
  • acrylian Administrator, Developer
    While I can't exactly reproduce your probkem, I have to admit that there is still somehow something wrong with the search pagination.
    I will look into that soon.
  • To reproduce the problem, you could do the following steps:

    1. Open the archive view of my page: http://www.synnatschke.com/gallery/?p=archive
    2. Click on the link which is behind "January (54)"
    3. Move forward to the 2nd page of the search results (http://www.synnatschke.com/gallery/page/search/archive/2008-01/2) and click on the first thumbnail. The picture will be loaded.
    4. Click on the subalbum "White Pocket" within the breadcrumb navigation

    Now the problem occurs, because the path is wrong. It leads to:
    http://www.synnatschke.com/gallery/north-america/usa/arizona/white-pocket/page/2

    instead of:
    http://www.synnatschke.com/gallery/north-america/usa/arizona/white-pocket/

    Hope you understand?
  • Looks like the search context has got lost. It should be saved in a cookie. I will look into this.
  • acrylian Administrator, Developer
    Just to add: I was able to reproduce the problem.
  • It was missing implementation. Look for a fix in the nightly build.
  • Sorry to say that, but it does not work, even with the nightly build. Same behavior as before. Please evaluate your work with the 4 steps I mentioned in my previous post.

    Edit: There is a new link named "search" within the breadcrumb. The path behind is also wrong:

    http://www.synnatschke.com/gallery/page/search//2
  • acrylian Administrator, Developer
    We are working on it.
  • How about tonight's build. Found the problem--it worked for tag searches, not date searches.
  • If you mean the link that is behind "Search" within the breadcrumb, that one works. But the main problem still exists, even with the tags!

    I am using a tag cloud on my index.php. The tag "sandstone" exists 38 times and needs 3 pages to display all the related thumbnails. Move forward to the second search page and click on the first thumbnail. Now the image opens. Look into the breadcrumb. The link behind "Misc" is wrong. The part "page/2" within the link is wrong, because that subalbum has just one page. But there is another bug within the breadcrumb. A click on the link "Search" leads back to the search results. But in case of the tag "sandstone", I get 39 matches, instead of 38. If I do the same for the tag "national park" and go back to the search result, the link looks like this:
    http://www.synnatschke.com/gallery/page/search/national park and I get this error:

    Zenphoto Error: the requested object was not found. Please go back and try again.
  • my search isn't working anymore either..

    searchresults show up.clicking on an item goes to proper link, vlicking on search in the breadcrumbbar goes back to search, clicking on a albumlink in breadvrumb bar goes to album correct but when in that album a thumb is clicked 'search' reappaears in the breadcrumb and navigation is lost. only deleting cookies resets this problem..
  • Search parameters are kept in cookies, In the earlier versions, not enought information was saved in the cookies to handle the breadcrumbs so I am guessing that you had some older cookies.
  • The issue I reported is still present even with latest versions. This is not due to an old cookie, because I deleted them before.
  • I deleted the cookies also before (with clear private data in firefox) but this time also went into the privacy settings tab) and this time the breadcrumb/tag/search worked with the 'example' theme.
    but not in my own theme.. one by one I copied over index,album, image, search.php to my custom theme to find if it was maybe a flaw in my theme but no luck.. untill I copied over the themeoptions.php from the example theme to my custom theme and then it worked. and is still working..unfortunatly I deleted the old file so I am not able to check where it came from.

    anyway it is working now.. question still.. what with people who do'nt delete their cookies??
  • BertSimons:

    I am not sure why copying themeoptions.php would make a difference.

    steffen:

    Since your site is password protected I can't look to see if I can see what is going wrong.
  • I disabled the password protection right now. You could try it again:

    1. Please click on the following link:
    http://www.synnatschke.com/gallery/page/search/tags/sandstone/2

    2. Click on the first thumbnail (called Horseshoe Bend)

    3. Click on "Misc" in breadcrumb navigation -> This leads to a page which does not exist: http://www.synnatschke.com/gallery/north-america/usa/arizona/misc/page/2 the last part of the link (page/2) is wrong
  • OK, I see what is happening. This may be a bit difficult to fix. The "Misc" link is actually a link back to the album and not really part of the Search breadcrumbs. It is being put out by the theme. But, since there is only one page number, that link is getting confused with the search page and using its page number.
  • The fix will be in tonight's build. However, it requires modifications to themes, so if you have a custom theme you will need to replace the part that prints out the album breadcrumb with the new function `printAlbumBreadcrumb()`.
  • sbillard.. just reread your reply to my post above... I have never never set an password for my site.. should be there at www.bertsimons.nl
  • It was steffen's site that was password protected. When he opened it up I saw what was going in with his problem. What do I need to do to see the problem on your site?
  • It works now. Thank you!
  • Sorry, but I discovered another wrong behavior concerning this topic.

    I modified the image.php a little. Instead of using the function getProtectedImageURL() to show up the image, I did include getAlbumLinkURL() to go back to the album/subalbum. But the link generated by getAlbumLinkURL() leads not back to the related subalbum. In case of the above mentioned example the link to the subalbum looks like this: http://www.synnatschke.com/gallery/north-america/usa/arizona/misc/page/2

    The correct one should be this: http://www.synnatschke.com/gallery/north-america/usa/arizona/misc/
  • Yes, that is not going to work. There really is no album link for search image pages.

    What you will have to do is add `$_zp_page=1;` before you use `getAlbumLinkURL();` We can make this part of `getAlbumLinkURL()`.
  • Sounds good, thank you!
  • I tried your recent changes (1070) you did in getAlbumLinkURL(). The line `$page = $_zp_current_image->getAlbumPage();` caused an error:

    Fatal error: Call to a member function on a non-object in ...zp-core/template-functions.php on line ...
  • Thanks. I probably should not be writing code at 3am!
  • The latest patch cures all problems. Thank you.
  • Thanks for the report. Also thanks for your dillagence in helping find and fix these problems.
Sign In or Register to comment.