ZenphotoCMS Forum
Album password not working properly - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Album password not working properly (/thread-9283.html)



Album password not working properly - elrol - 2011-11-18

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.




Album password not working properly - sbillard - 2011-11-18

What are your site settings? Do you have passwords on more than just one album, for instance, on the gallery?




Album password not working properly - elrol - 2011-11-18

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.




Album password not working properly - elrol - 2011-11-18

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.




Album password not working properly - sbillard - 2011-11-18

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.




Album password not working properly - elrol - 2011-11-18

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.




Album password not working properly - elrol - 2011-11-18

looking deeper at this

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

``

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.




Album password not working properly - elrol - 2011-11-18

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




Album password not working properly - elrol - 2011-11-18

Got it to work .. at least for what I need it for.

Change :

``

To :

``




Album password not working properly - sbillard - 2011-11-18

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.




Album password not working properly - elrol - 2011-11-19

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




Album password not working properly - sbillard - 2011-11-19

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.




Album password not working properly - n20capri - 2012-08-20

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




Album password not working properly - sbillard - 2012-08-20

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.




Album password not working properly - n20capri - 2012-08-20

Upgrading to 1.4.3.1 worked - not sure why the last upgrade to 1.4.3 didn't but either way.

Thanks




Album password not working properly - sbillard - 2012-08-20

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.