I'm having a problem getting the comment form to work with the "Only members can comment" option. The comment form displays fine when logged in and immediately when I log out. However, after refreshing the page or going to another page the comment form disappears completely instead of saying "Only registered users can comment" or some such. The code around it isn't causing any problems, the printCommentForm() function simply does not print anything.
Thanks,
kagutsuchi
All the theme is using to call printCommentForm() is this:
`
This is a test.
`
The test paragraph and br work but the comment form isn't displayed at all, not even any of the comments that the comment form usually has. I've looked through my theme files and I can't seem to find anything that would be blocking the comment form from displaying. Would you have any idea of what might be causing this?
The link to the site is in my profile but I'll post it here too: http://www.archlinuxgallery.com/zenphoto/
To see this for yourself feel free to register an account.
And thanks for all of your help!
It's being called when logged in and immediately after log out though, and the "This is a test" is still output whether logged in or out. It's only after logging out and refreshing the page that it doesn't work (or if you weren't logged in in the first place). printCommentForm() should be called, and if it's not then I have no idea why it's not. :/
Out of curiosity I finally tracked down the problem (though I still don't know why it happens). For some reason, after logging out, the commentform* options all get set to 0, even though they are 1 when logged in. Now time to try to find where these options get changed...
Edit: the commentform* options are changed because comment_form_members_only is enabled which turns them off after logout. However, it looks like switching these off will simply have the printCommentForm() function return instead of printing the comment form with comments disabled.