Zenphoto object requesting cannot be found

Hi

From the first page of my site www.outzeal.com when I click on the link "next" or "2" to access the second page the following message comes:

"The Zenphoto object you are requesting cannot be found"

On some occasions it works but mostly it doesn't.

Thanks
«1

Comments

  • fretzl Administrator, Developer
    I can confirm this.

    Opened an "issue"(ticket) on GitHub.
    https://github.com/zenphoto/zenphoto/issues/587
  • fretzl Administrator, Developer
    There has been a fix. Please try the support build.
  • Thanks I saw github (though can never understand all the tech stuff).

    You've mentioned it happens with combinews feature but I havent enabled that on my zenpage theme.

    The proper link should be:
    http://www.outzeal.com/index.php?p=gallery&page=2

    This error leaves out "p=gallery&"

    Sometimes it happens and sometimes it doesnt.

    Regarding the support build - is it a new one which caters for this issue? I just tried one last week.

    regards
  • fretzl Administrator, Developer
    Well, I could only reproduce the issue with CombiNews enabled.
    In this case the problem was caused by something else entirely.
    I think the fix will also solve your issue.

    The "support build" is the latest official release but with the latest bug fixes and enhancements. Changes are almost daily.
    This fix is now in the support build.
    So please try it.
    https://github.com/zenphoto/zenphoto/archive/master.zip
  • acrylian Administrator, Developer
    The support build should not have the CombiNews issue anymore actually.
  • thanks guys but updating everytime for a bug means redoing all the customized design work :(

    is it possible to update some relevant files regarding this issue

    regards
  • fretzl Administrator, Developer
    That's why it is strongly advised to make a duplicate theme first and customize that one.
    http://www.zenphoto.org/news/theming-tutorial#duplicating-cloning-a-theme-for-customizations

    In this case you can just copy the `themes/zenpage/functions.php` file (from the support build) to your theme folder.
  • acrylian Administrator, Developer
    Of course if a bug would require changes to the theme you have to re-do it to your customized version. That is not avoidable.

    In this case it does not affect the theme.
  • hi sorry for coming in late (away on my flight)

    functions.php solved the issue, thanks however I've discovered something else i.e. When I create a database backup in the overview section by clicking on the backup/restore button, the backup file is created but at the same time all my theme settings are changed and comments deleted. I then have to restore to my old settings by using the restore command.

    At the moment I am updating the zp-core folder from the support build. If it does not solve the problem, I'll open up a new issue.

    regards
  • acrylian Administrator, Developer
    I cannot reproduce this behaviour with the support build. You should look at your error logs.
  • ok. with the latest support build it is corrected. thanks.

    however i'll be grateful if you can confirm the functioning logic of the search feature:

    From the gallery (http://www.outzeal.com) if you search for the word "mountain", it gives results.

    Once you enter an album e.g. TREKKING (http://www.outzeal.com/index.php?album=trekking)

    and then search for the word "mountain", it gives NO results.

    Is this normal or some fault.

    Thanks
  • acrylian Administrator, Developer
    This is not normal and sadly I cannot reproduce this either. Is the search cache enabled? What are the search options?

    Edit: It seems you have the search option "search within results" enabled. Try disabling that.
  • no that's not the case.

    Default search is set to "New" not within.

    Do not return album, image, news, pages matches are not checked.

    Cache expiry is set to 0 mins
  • fretzl Administrator, Developer
    I can confirm this behavior.
    As soon as you are on an album page (album.php) the search stays within the album.
    Somehow the "New" option is not processed.
  • acrylian Administrator, Developer
    Ok, best open a ticket.
  • Just for everyone's information:

    When you are in an album your search is done on items that are contained in that album. This has nothing at all to do with the option you reference. That option states that the normal search from search page results will be either a search of the results or a new search.
    Default search sets how searches from search page results behave. The search will either be from within the results of the previous search or will be a fresh new search.
    Of course you can override this behavior in your theme by passing the appropriate parameters to the function that prints the form, but I suspect that it will end up confusing your users.
  • Thanks for clarification, however I am still unclear about one thing.

    1) In a gallery that has only the main albums (e.g. homepage) everything is searched.

    2) From a gallery if you enter an album which has sub-albums in it:

    The search feature searches within album description e.g. http://www.outzeal.com/index.php?album=trekking

    And not within subalbum (thumbnail) description e.g. http://www.outzeal.com/index.php?album=trekking/photos

    3) When you enter the final album (which has no subalbums) the search is within both the album description and image description e.g.

    http://www.outzeal.com/index.php?album=trekking/photos/northern-areas-of-pakistan

    To me point no 2 is causing the confusion i.e. why there is no search within the thumbnail description or for image decription when you are in an album that has sub-albums?

    Regards
  • The search looks only at items that are part of the album. Items contained within subalbums do not fit that criteria.

    From viewing your gallery it would appear that there are no images within any of the parent albums, so naturally they will be no images retrieved from searches in those albums.

    You can, of course, alter this as I mentioned. Simply pass all the names of all the subalbums you wish to be searched.
  • acrylian Administrator, Developer
    Also you can modify your theme's search.php to not search within albums. This is what our own site does.
  • thanks a lot for the help.

    just started php recently so i guess it'll take me some time to modify the functions which I find a bit confusing.

    regards
  • acrylian Administrator, Developer
    Yes, it takes some time to get into this. Sadly not avoidable. Especially since the search.php page is a bit more complicated than others.

    You can look however at the e.g Zenpage theme and our site theme. Both are on GitHub in separate repos.
  • ok thanks, in any case my next task in line is a request feature on github :)
  • The feature you wish does already exist, you just have to modify your theme to invoke it.
  • No not this feature. Its a totally new one i.e. the header.jpg image is selected automatically when a particular album is selected e.g. when viewing scuba diving album the header image is something related to water and not mountains.

    thanks
  • You can do this if you want. It is not a new feature. Just something you have to code.
  • fretzl Administrator, Developer
    You could try something like this in the `` of `album.php`
    `
    <?php if ($_zp_current_album->name == "scuba-diving") { ?>

    #header {
    background-image: url(<?php echo $_zp_themeroot; ?>/images/some_image.ext);
    }

    <?php } ?>
    `
  • Oh Thanks a lot. love it when some one sends a code
  • ok great its working fine except that there was an extra > before the image ext which i have removed. However it only works uptil this stage:

    http://www.outzeal.com/index.php?album=scuba-diving

    After this it reverts to the original setting. Can you please send me some code to rectify this. I am sorry I've taken up lot of your time.

    Thanks
  • fretzl Administrator, Developer
    Of course you have to do some coding for every album ;-)

    A bit different but easy to modify. Just copy and paste extra lines for more albums.
    A note: the code uses the album name and not its
    title (the name is the name of the album folder)

    `

    #header {
    background-image: url(
    <?php if ($_zp_current_album->name == "scuba-diving") { echo $_zp_themeroot; ?>/images/some_image.ext<?php } ?>
    <?php if ($_zp_current_album->name == "skiing") { echo $_zp_themeroot; ?>/images/another_image.ext<?php } ?>
    <?php if ($_zp_current_album->name == "trekking") { echo $_zp_themeroot; ?>/images/yet_another_image.ext<?php } ?>
    );
    }

    `
Sign In or Register to comment.