WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page Password not working (24 posts)

  1. ateale
    Member
    Posted 6 years ago #

    Hey Guys

    I am trying to password protect a page.

    Once I publish the page and visit it on another machine I am UNABLE to successfully view the contents of the password protected page.

    I KNOW THE PASSWORD IS CORRECT.

    I searched this topic and it seems many others have had this issue a few months back, but no one has discussed whether they have fixed it or not.

    Any help would be brilliant!

    Cheers

    Adam

  2. sarmadhassan
    Member
    Posted 6 years ago #

    Iam facing the same problem as well.. i ve googled all the support forums for wordpress including the official one.. couldnt get any convincing answer. Please help us!

  3. sarmadhassan
    Member
    Posted 6 years ago #

    okay.. i got a solution to this.. although not very decent looking but it worked for me..

    change the line in wp-pass.php

    from

    wp_safe_redirect(wp_get_referer());

    to

    wp_safe_redirect(wp_get_referer() . '?');

  4. solenyi
    Member
    Posted 6 years ago #

    You got it!!!!

    You saved me thank you!!!

    You soluted this:

    http://wordpress.org/support/topic/144829?replies=5#post-653406

    GREAT! THANKS!!!

  5. ateale
    Member
    Posted 6 years ago #

    sarmadhassan you are AWESOME!

    thanks a lot mate!

  6. DonnaFoo
    Member
    Posted 6 years ago #

    I'm going to try sarmadhassan's solution but I just wanted to say that I have been having issues and hard time finding a fix to this problem. I'll post again to let you know if this helped. BRB.

  7. DonnaFoo
    Member
    Posted 6 years ago #

    Sorry. This isn't working for me at all. I enter my password and it just refreshes with the same message and password field.

    I've cleared my cookies and whatnot, even tried this over and over in the past week to no avail.

    Any help would be greatly appreciated. Thank you.

  8. DonnaFoo
    Member
    Posted 6 years ago #

    I tried this solution again and it seems to be working. I've been having this issue work and not work at different times. It's quite frustrating because other people rely on coming back to password protected pages and then not being able to access them. Thank you once again.

  9. nonreachability
    Member
    Posted 6 years ago #

    i faced the same problem with the password protection and tried sarmadhassan solution and it works FINE!!!!!!!!!!!!!!!!!!!!

    thaaaaaaaaaaaaaannnnnk you so much. hope that it will still work in the future.

    but for now you made my day.

  10. shesjustrobin
    Member
    Posted 6 years ago #

    *Sigh* His solution didn't work for me and I'm still having the entering pw and "nothing happening" problem.

  11. EyePhoto
    Member
    Posted 6 years ago #

    Thanks sarmadhassan when entering password on my test page it was just going to 'wp-pass.php' and a blank page! now works, good stuff.

  12. arib
    Member
    Posted 6 years ago #

    Well this does not work at all because it does not matter what you enter in the pw field, your page/post gets displayed !!

    Is that not a fact ? It happens on my site anyways ...

    regards,
    Ari

  13. danicasati
    Member
    Posted 6 years ago #

    It works for me.
    Thanks.

  14. dominicwitherow
    Member
    Posted 6 years ago #

    Just upgraded to 2.5.1 and this VERY ugly issue reappeared. I reset the wp-pass.php file again and it seemed to work the first time, but now it's back to how it was.

    Can anyone help?

    Thanks
    Dominic

  15. arib
    Member
    Posted 6 years ago #

    danicasati, how could this work ? all it does is add the questionmark symbol to your url that is:

    http://myurl/index.php/protected-page/

    would become if any password is entered

    http://myurl/index.php/protected-page/?

    and your protected page will be displayed even though the pass entered is not the correct one.

    Could you try using an incorrect pass next time you log onto your pages to see if I'm right.

    regards,
    Ari

  16. lgoodwin3
    Member
    Posted 6 years ago #

    I installed 2.5.1 and page passwords are not working. They worked in an earlier version. I tried the fix above and it does just add a ? to the URL. As of today is there any fix available. Seems like this should just work.

    I can enter a password in the page form. Then when I access the page I get prompted for the password. After entering the password it just displays the password prompt page again.

    My index.php file is in /www and wp is in www/wp
    It has the following which is just to handle the wp directory being under the www directory.

    #<?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp/wp-blog-header.php');
    ?>

    There is an .htaccess file in /www that has the #BEGIN WordPress #END WordPress in it.

    Any help would be appreciated. thanks larry

  17. patbuser
    Member
    Posted 6 years ago #

    Hi everybody

    I have exactly the same problem. When typing the password nothing happens, is just brings up the password entering page again. I have tried the "solution" with the ? but it didn't work for me.

    My config is identical to Igoodwin3, with the blog in a subdirectory and the index.php is just pointing to that subdirectory.

    Any help is still appreciated!

    Patrick

  18. depperson
    Member
    Posted 6 years ago #

    I'm having similar problems, but my exception is that the password protected page/post is still viewable WITHOUT A PASSWORD.

    I will try the aforementioned solution to see if that helps.

  19. Gerogehanson
    Member
    Posted 6 years ago #

    depperson: did you find the way around this?

    I can enter the password at first, but from then on it does not seem to work. The page shows but the password section isn't showing. It is like the password entry section only works one time. Help if you can. Anyone?

  20. laowaichinese
    Member
    Posted 6 years ago #

    sarmadhassan's solution didn't work for me either.

    But here's some new info:
    - I'm on WordPress 2.5.1
    - password-protected posts work FINE with IE7
    - but, on FIREFOX 3.0, when I enter the correct password, it refreshes the same "enter password to see the post" page without ever displaying the content.

    Have we heard from anyone at WordPress on this issue yet?

  21. guffert
    Member
    Posted 6 years ago #

    I have posted to the problem already on the German site, but now I have some deeper insight into the problem. In WordPress 2.5.1 the code in wp-pass.php is
    wp_safe_redirect(wp_get_referer());
    For IE 7 there is all correct, but in Firefox 2.0.0.14 and 15 I still have problems. My daughter just mailed to me that they have no problems with Firefox. This way I found wp_get_referer() to return an empty string and hence the redirection is not performed. This is due to unused PHP predifined variables. The application of these variables, such as HPPT_REFERER, strongly depends on the browsers user agent. I have installed the User Agent Switcher, but none of the preinstalled agents are able to read the $_SERVER ['HPPT_REFERER'] , as IE 7 is doing. This way I made changes to the code above to

    $location = wp_get_referer();
    if ( $location == '' )
         $location = './';
    wp_redirect($location, $status = 302);

    Surely, his is another workaround, as the wp-pass.php may be used in quite another context.

    Of course, this solution is applicable for users having access to the code. On my daughters wordpress.com blog the URL is afterwards password submit http://.../wp-pass.php . The page displayed is empty and white. I usually delete the wp-pass.php letters from the URL and this way get access to the protected page I wanted to see.

    Hope some guys of WordPress may read the issue to resolve the problem.

    Good luck in your case!

  22. Kodiak3000
    Member
    Posted 5 years ago #

    I'm having this problem too, only it DOESN'T work in IE6 or 7. I develop on Firefox, and it's not working there either (v3). I've also tried the wp_safe_redirect(wp_get_referer() . '?'); solution, but that doesn't work either.

    I'm using WP 2.6, but it didn't work with 2.5.1 either.

    I don't hold out much hope, but I'm thinking that if we keep the thread alive, maybe someone will have a look?

    On that subject, I think I'll pop over and see about listing it as a bug.

  23. laowaichinese
    Member
    Posted 5 years ago #

    Just installed Firefox 3.0.1 and now everything works for me.

  24. Anonymous
    Unregistered
    Posted 5 years ago #

    I found the blank page after hitting submit to be a firewall issue. The particular machine had Computer Associates Personal Firewall on. Once I turned it off the screen came right up after putting in the password and hitting submit

Topic Closed

This topic has been closed to new replies.

About this Topic