PDA

View Full Version : password protecting admin folder conflicting with comment form, can anyone help?


jgrayson
01-27-2009, 11:50 PM
someone just pointed this out to me (i had no idea it was happening). i have an htaccess/htpasswd file set up to password protect the admin folder. the htaccess/htpasswd file is located in the admin folder and works as it should EXCEPT when a visitor comes to my site and submits a new comment, the password popup window appears on the submit page (index.php?x=save_comment) asking the user to log in. the comment goes through to the moderation section in the admin panel but i can't figure out for the life of me why the password popup is appearing when it should only appear when trying to access the admin folder.

the only thing i can think of is that the comment form is trying to access a file/code located within the admin folder. can someone chime in who might be able to shed some light on this? for now i have to remove the password protection for the comment form to work properly.

if you need me to turn back on the password protection so you can see it happen then let me know. the site it's happening on is http://suffocate.us (not happening right now since the password is turned off)

thanks in advance for the help with this.

john

sentinel
01-28-2009, 09:55 AM
i may be wrong but..

the "thankyou-page" is accessing the admin_index.css file in the admin folder.

without modifying php files:
you may be "impolite" to your visitors in the future by adding
<input type='hidden' name='withthankyou' value='no' >
to the comment form in your template (thankyou-page will not be shown anymore)

with modifying php files:
on the other hand you can modify "includes/functions_comments.php" line 282.
change the entry to a stylefile within your templates folder and
copy the necessary css-code from admin_index.css file.

keep in mind... by changing php files you might loose support of the pp-team

jgrayson
01-28-2009, 03:03 PM
thanks, i figures it was pulling something from the admin folder but didn't know what. is there a reason why the thankyou-page is pulling styles from the admin section instead of a template style sheet?

sentinel
01-28-2009, 03:11 PM
well maybe that's a question for #devels =)
imho it shouldn't be a problem to move the according css lines per default
(even this might end up in quite some unstyled thankyou-pages after next release )