WordPress Password Protected Pages / Posts Error Logging In Fixed
I’m running WordPress 3 with Domain Mapping on one installation. The domain mapping plugin lets you map sub-blogs (www.mysite.com/blogone and www.mysite.com/blogtwo) to unique URLs (www.mysite.com and www.myothersite.com).
I recently discovered when I went to password protect a page on one of the sites that it totally failed. The password form would load, but when I entered the correct password it just reloaded the page with the password form still showing.
The culprit turned out to be in the wp-pass.php file. Line 16 uses PHP’s setcookie function to set a cookie good for 10 days that grants access to the page / post if you have entered the correct password. However, it uses the COOKIEPATH constant to define which directories (folders) on your site are accessible once the person is logged in. For me, COOIKEPATH was coming up as wordpress-mu (I originally started with that, then upgraded to WordPress 3). A simple fix was to edit the line to:




November 7th, 2010 at 7:36 pm
I am getting the same behavior out of password protected pages. You fix didn’t help. Any other ideas??
November 7th, 2010 at 10:57 pm
Can you provide some details? What version of WordPress are you using? Link to the page that is showing the issue? I’d be happy to try and help you sort it out.