ZenphotoCMS Forum
Comment form problem - 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: Comment form problem (/thread-5822.html)



Comment form problem - kagutsuchi - 2009-09-10

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




Comment form problem - sbillard - 2009-09-13

Perhaps it is something in your theme. This is working correctly for me.




Comment form problem - kagutsuchi - 2009-09-13

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?




Comment form problem - sbillard - 2009-09-13

How about a link to the site? The printCommentForm code is pretty straight forward. It will either display the comment form or the "only rgistered users" message. There are no third options.




Comment form problem - kagutsuchi - 2009-09-13

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!




Comment form problem - sbillard - 2009-09-13

there is no `` showing on your image page--therefore the printcommentform() must not have been called.




Comment form problem - kagutsuchi - 2009-09-14

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. :/




Comment form problem - sbillard - 2009-09-15

Sorery, but I visited the link you gave. On the images there thre is no div as described. That div is always output from the pringCommetForm. So I guess that there is nothing more I can do to help.




Comment form problem - kagutsuchi - 2009-09-16

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.