Problem with Comments

For some reason the enable/disable comments stuff isn't working for me (default load, nothing changed).

For the Albums commenting, the box is always unchecked. If I select it, save it and get a successful save message, the box is unchecked again.

For the Image commenting, the boxes stay checked/unchecked, but it doesn't seem to affect the ability to comment at all. Regardless of the box, I am always able to see the comment form and apply a comment.

Anyone seen this behavior before?

Thanks,
Matt

Comments

  • I have seen this when the update.php program was not run. However, if you had comments working that would not be the case. Anyway, this is an indication that the option is not being successfully set in the database.

    Can you look at your album table and see if there is a field named `commentson`
  • No, there isn't a commentson field in album, only "closecomments". If I were to add it manually, should that clear up the issue? What are the field settings I need to put in? Keep in mind I'm pretty new to databases - I using PHP mySQLadmin on this particular host.

    Thanks for the help.

    p.s. This was a fresh install of 1.1.2, not an upgrade. Also, the database is mysql 5.0.
  • All you should need to do is run the upgrade.php program. It should add the field to the DB. It looks like there is an omission in the setup.php file. It should have created the field. Thanks for your post. We will fix this for future users.
  • upgrade.php wont run:

    MySQL Query ( INSERT INTO `options` (`name`, `value`) VALUES ('gallery_title', 'Gallery'); ) Failed. Error: Duplicate entry 'gallery_title' for key 2
  • That's ok. It is a known problem with upgrade on the 1.1.2 release. (fixed in the nightly build) However, it did run correctly so your albums table should have the required fields.
  • I ran the update, and it did indeed create the commentson field - though it still has no effect as to allowing comments or not.

    I've tried removing the check at both the album level, and at the image level. One is always able to leave a comment.
  • What theme are you running? Can you provide a URL?

    I have tested this on the Effervescence+ theme and it is working correctly.

    It is necessary for the theme to participate in this action. If a theme puts out a comment block without checking if they are allowed, then the options will have no effect.
  • Ahh.. I see. I'll check into the theme code and go from there using the Effervescence+ theme as a reference. I'm currently trying to customize the cimi theme (though I've seen the behavior in every theme I've tried). The site is still in early development - lots of things broken. http://gallery.knipknives.com

    Thanks for your help.
  • you will need to place `<?php if (OpenedForComments()) { ?>` `<?php { ?>` around the HTML for the comment block.

    The site looks nice. Let us know when you are done.
  • That did the trick! Thanks again for all of your help.
Sign In or Register to comment.