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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Christoph C. Cemper’s picture

Category: bug » support
Priority: Normal » Minor
Status: Active » Closed (won't fix)

Thanks 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...

korayal’s picture

same here;

what i got is this,

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/hecatomb/public_html/includes/common.inc on line 1940
.
.
.
warning: Invalid argument supplied for foreach() in /home/hecatomb/public_html/includes/common.inc on line 1971.
.
.
.
same errors a few more times, then;
.
.
warning: Cannot modify header information - headers already sent by (output started at /home/hecatomb/public_html/sites/all/modules/devel/devel.module:283) in /home/hecatomb/public_html/includes/common.inc on line 309.

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)

korayal’s picture

Status: Closed (won't fix) » Active

When i disabled the devel module, the problem was gone. (or i can't see the problem :) )

Lloyd Standish’s picture

Thought 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.

Lloyd Standish’s picture

Priority: Minor » Normal

It 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.

greggles’s picture

Title: warnings and errors upon publishing anonymous comment » if emails are not required by drupal, validate the comment submit form to require emails if they try to get comment notification
Category: support » feature

I'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.

sisyphos’s picture

How 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

greggles’s picture

Status: Active » Needs review
FileSize
1.11 KB

Here's a patch.

@antjefinger - I don't understand your question but this issue is only about how to add this feature to comment_notify.

greggles’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Assigned: Unassigned » greggles
Status: Needs review » Fixed

This is now committed to the 5.x-2.x branch: http://drupal.org/cvs?commit=130460

Thanks everyone for the ideas.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.