Album password not working properly

I am using : version 1.4.1.6 [8326](fresh install) and I am having issues setting an album password for private viewing.

Once I set the password in Admin and then try the password on that album in another browser, I am never allowed into the album. I just keep seeing the password entry page.

Any help would be appreciated. I can provide links and passwords to the devs to test if needed.

Comments

  • What are your site settings? Do you have passwords on more than just one album, for instance, on the gallery?
  • I only have put a password on one gallery. I do not have a global gallery password. Please see here

    http://order.stein-photos.com/ and you will see the Gallery for the Lloyd Family is password protected

    go to that gallery and put in the pass 'test'

    when I do that here, I am taken to the Zenphoto admin login page and can never see the gallery.
  • When looking at the source code of the page that is asking for the album password, I see this hidden form element

    ``

    that could explain why it keeps redirecting me to the admin sign in page.
  • Well, yes, if that is the redirect it would take you to the admin logon, not the gallery page.

    Since you are running a custom theme, check to be sure you have not got any deprecated errors. If the theme is supplying the password form it may be incorrect.
  • I do not think my custom theme is supplying the password form.

    Where would I see that?

    I do not have any code for this type of form in my custom theme.
  • looking deeper at this

    I see that the printLoginForm on password.php is passing NULL for the redirect.

    `<?php $_zp_authority->printLoginForm(NULL, true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>`

    and then on lib_auth.php lines 768 - 770 - if redirect is NULL, then redirect is set to point to the admin login.

    hope this helps.

    Not sure how to fix this though.
  • Changing NULL to $_SERVER['PHP_SELF'] on pasword.php does not work either. That sends the user back to /index.php as that is the page calling the overall scripts.

    I am still playing with this, to see if I can figure out the proper $server variable to use
  • Got it to work .. at least for what I need it for.

    Change :

    `<?php $_zp_authority->printLoginForm(NULL, true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>`

    To :

    `<?php $_zp_authority->printLoginForm($_SERVER['REQUEST_URI'], true, $_zp_gallery->getUserLogonField(), false, gettext("A password is required for the page you requested")); ?>`
  • SO your theme does not have a password.php and is using the default one? Or if it does, then it is not using the printPasswordForm() template function.

    You should try with an unmodified install/distributed theme and see if there is a problem with that combination.
  • No, My theme does not have a password.php file (though I may look into this). I should try as you ask, with an official Zen theme.

    Thanks
  • The default password.php does not use the `printPasswordForm($hint, $show);` function (which it probably should.) You can copy the script from the zp-core function to your theme and change the code to use printPasswordForm. This should fix the problem.
  • I'm running into the same issue...not the redirect issue but the not being able to view the gallery once password is entered issue. It keeps telling me "There was an error logging in. Check password and try again."

    I'm running a custom theme but the stock themes aren't working either...won't let me login.

    I even tried elrol's change this to that but it didn't work either. Recent upgrade to 1.4.3. I have another 1.4.3 install and that works fine. What do I need to copy from that to make the other one work?

    Thanks,
    Mike
  • The two installs should be identical if they are both 1.4.3.

    You should upgrade to the 1.4.3.1 release. Then you will need to re-save any album passwords that were created on the 1.4.3 base release.
  • Upgrading to 1.4.3.1 worked - not sure why the last upgrade to 1.4.3 didn't but either way.

    Thanks
  • There is a bug in 1.4.3 which caused the password to be double encrypted before storing. All such stopred passwords will necessarily fail.
Sign In or Register to comment.