I have Drupal 5.2, theme pushbutton.
What I did:
1. Install the module. Copied comment.module.d5 to overwrite modules/comment/comment.module.
2. Activated module. Fixed permission to allow anonymous commenting and allow (not require) leaving email address.
3. Logged off as administrator. Left an anonymous comment but without leaving any email address.
4. Logged back in as admin. Went to comment queue and found the anonymous comment. Checked box to publish the comment. Error messages below appeared.
Regards,
Lloyd
warning: Invalid argument supplied for foreach() in /var/www/lloyd/drupal/modules/node/node.module on line 521.
warning: implode() [function.implode]: Bad arguments. in /var/www/lloyd/drupal/modules/node/node.module on line 525.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/www/lloyd/drupal/includes/database.mysql.inc on line 172.
Comment | File | Size | Author |
---|---|---|---|
#8 | 171034_comment_notify_if_checked_require_email.patch | 1.11 KB | greggles |
Comments
Comment #1
Christoph C. Cemper CreditAttribution: Christoph C. Cemper commentedThanks for your report,
>Fixed permission to allow anonymous commenting and allow (not require) leaving email address.
but sorry, the setup instruction clearly state you need to REQUIRE people to leave an email address,
else this module doesnt make sense.
it might be an idea some future improvement to automatically set those comment settings... but I got no time for this in the next months...
Comment #2
korayal CreditAttribution: korayal commentedsame here;
what i got is this,
This is really a module that i've been waiting for years, but it messes up with the comment sending and publishing process. (the comment module change)
Comment #3
korayal CreditAttribution: korayal commentedWhen i disabled the devel module, the problem was gone. (or i can't see the problem :) )
Comment #4
Lloyd Standish CreditAttribution: Lloyd Standish commentedThought I'd say here what I wrote to Christoph.
The way the module is now, it *requires* a person to enter his email address when leaving a comment. That means there is no such thing as an anonymous comment with this module.
I'd like leaving an email address to be optional. If its not left by the commenter, then of course there will be no notify emails.
Comment #5
Lloyd Standish CreditAttribution: Lloyd Standish commentedIt turns out that even with email address obligatory for anonymous comments, the ugly warning messages I previously reported appear upon "approving" comments. However, the anonymous comments are approved and the comment notify module seems to work.
Comment #6
gregglesI'm restating this title a bit.
I think that in comment #4 Lloyd has given a good reason why you should be able to have this module enabled AND allow anonymous comments.
So, the solution is that if a user has checked the comment notify box then when the form is submitted the module should check that yes, they have populated an email address. If there is no email, the module does a form_set_error to alert the user that their choices of getting email followups and not leaving an email are incompatible. Since this is a change in functionality (i.e. not a bug) I am marking it as a feature request.
Comment #7
sisyphos CreditAttribution: sisyphos commentedHow could You solve this problem. I get the error also on pages without comment, i.e. the page "contact". I don't know how ican solve this problem.
Antje
Comment #8
gregglesHere's a patch.
@antjefinger - I don't understand your question but this issue is only about how to add this feature to comment_notify.
Comment #9
gregglesThis is now committed to the 5.x-2.x branch: http://drupal.org/cvs?commit=130460
Thanks everyone for the ideas.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.