If a user (for whatever reason) tries to post to a node which doesn't allow this, he currently doesn't get an error message. This patch fixes this.

Comments

killes@www.drop.org’s picture

Project: » Drupal core
Component: usability » comment.module

recategorizing to show up in the patch queue.

Steven’s picture

I'm not 100% sure about this patch. We don't normally cater to inaccessible forms. I suppose the comment form is a candidate, when a moderator disables commenting on a (heated?) topic while people are still typing replies.
But are there more probably situations like this out there?

killes@www.drop.org’s picture

As you mentioned the comment form isn't neccessarily inaccessible, the sending of the comment might become later. We should present a meaningfull message to the user in that case. I am developing a module where you can only comment for a limited amount of time, so no message is actually confusing.

dries’s picture

I don't think this needs fixing.

killes@www.drop.org’s picture

I disagree. The user doesn't get a 403 or anything, just an empty "Post comment" page.Tha's bad usability.

drumm’s picture

+1

Although it is a rare case, this is a really simple fix that might as well go in.

killes@www.drop.org’s picture

StatusFileSize
new723 bytes

Updated to cvs. Better wording.

TDobes’s picture

+1 from me too... although with one minor complaint: we want to say "post" rather than "posts" in the error message.

Although this is a rare case, it is one users may sometimes encounter... and a total lack of feedback as we have now is bad.

Steven’s picture

Status: Needs review » Fixed

There appears to be a similar message in core already now.

killes@www.drop.org’s picture

Status: Fixed » Needs review

If I am not totally mistaken, this is just a watchdog message. I want user feedback. this is needed for the evaluation.module where after some time the postign to nodes gets disabled.

Steven’s picture

Status: Needs review » Fixed

Err no:

    $txt = t('Comment: unauthorized comment submitted or comment submitted to a closed node %subject.', array('%subject' => theme('placeholder', $edit['subject'])));
    watchdog('content', $txt, WATCHDOG_WARNING);
    drupal_set_message($txt, 'error');

Note the drupal_set_message(). Granted, the text is quite user-hostile.

Anonymous’s picture

trigear@drupal.trigearproductions.com’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)