n images per page

I have two installations of zenphoto - both on the same web site - one works as expected in the function listed below, but the other has this problem:

Under Albums -> Images - one gets a listing of all the images in an album.
At the top right hand of this page is a drop down to enable viewing more or fewer images at a time - 5 images per page, 10 images per page - up to a limit which varies (! )

One can select an alternative in this dropdown but in the installation in question nothing then happens - no change occurs - - am I missing a setting somewhere?

Thanks,
Richard

Comments

  • acrylian Administrator, Developer
    edited November 2018

    up to a limit which varies (! )

    The limit is calculated on the total number of images that the current album has.

    I cannot really answer why changing the value won't work. Since it is the same browser it probably can't be JS being disabled as that would trigger the reload of the page to change the number.

    The number is actually per user via cookie so maybe that is not working on that install (different server?).

    I can only assume that something else interferes somehow. So here the usual advise to review error logs. That ate the ZP debug log, PHP server ones and also the browser one as that would have any JS errors.

  • In the browser console the following is noted each time I try to change the dropdown in the zenphoto instance where it doesn't work:

    admin-edit.php?page=edit&album=Belgium&tab=imageinfo:453 Uncaught ReferenceError: zp_gotoLink is not defined
    at HTMLSelectElement.onchange (admin-edit.php?page=edit&album=Belgium&tab=imageinfo:453)
    onchange @ admin-edit.php?page=edit&album=Belgium&tab=imageinfo:453

    As I don't know your code I don't know what it is referring to.

    Thanks,
    Richard

  • acrylian Administrator, Developer
    edited November 2018

    zp_gotoLink() is a JS function from admin.js. That file is generally loaded on the backend and available. Sadly that line in the browser log is not matching the actual code (since it not refering to the plain file). In any case that is doing the page reload to change so that fails.

    Is that file existing in zp-core and if is it listed on the browser log as loaded (your browser might have developer tools which lists all files loaded). And is this actually the current Zenphoto version?

  • Zenphoto version 1.5 (Official build)

    Thank you - I will investigate further.

    Thanks,
    Richard

  • admin.edit is loaded from memory
    and admin.js is the iniatior.

    I don't seem to be able to attach a screen shot?

    Thanks,
    Richard

  • acrylian Administrator, Developer

    Lacking any proper idea (and not being able to reproduce the issue) try disabling all plugins especially 3rd party ones you may have. In case anything from there is interfering somehow.

    Sorry, uploading images etc. is not enabled on this forum for various reasons. Please upload elsewhere (e.g. your own site) and link to it.

  • I am still struggling with this. I have developed a Zenphoto installation in a subdirectory named 'new_postcards'- the program was working fine, including the dropdown discussed above. But I want to change the directory name.

    Up to now I have copied everything to the new folder - now the program still runs but the dropdown does not.

    I have a backup (files and database) of an installation that worked fine in the directory I developed it in. I have just put all of that into

    I am wanting to change the name of the subdirectory it is in - when I do this, even if I have edited the .htaccess file as per instructions, it insists on running the setup program - once that has been run the drop down action no longer works.

  • acrylian Administrator, Developer
    edited November 2018

    You don't need to copy the fikes if you want to change the folder ZP resides in. Just rename the folder and thre-run setup or modify the htaccess file manually so the Rewritebase has the correct folder name. However the backend does not use htaccess/modrewrite actually.

    It might be that on copying you accidentally messed with file/folder permissions but this is a wild guess. But this can cause all sorts of weird trouble.

  • After a lot more work - it seems to me whether this works or not is something to do with cookies (of which I understand very little). If, using one browser, I find the dropdown is no longer working, if I change to another browser it works.

    Perhaps changing the name of the folder housing zenphoto invalidates the cookie?

    Anyway, that's my conclusion so far.

    Thanks for your help,
    Richard

  • acrylian Administrator, Developer

    As I suspected it is related to the cookies. While the site address change can invalidate cookies, this cannot be the reasone if it works in one browser. In any case clearing cookies would solve that. I assume you have checked if the browser in question allowes cookies at all? Any other privacy blocker plugins or else active? These can have unexpected side effects.

    However I put on the list to check why this setting is stored in a cookie at all although it could also be tied to the user account and stored there.

Sign In or Register to comment.