The help text that says "login or register to post comments" does not appear underneath nodes on the front page. It does appear when viewing a node.

To recreate:

1) ensure anonymous users can neither post or access comments
2) Log out of the site
3) Go to the front page. Notice that the "login or register..." message does not appear beneath any of the nodes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steve Dondley’s picture

Assigned: Unassigned » Steve Dondley
FileSize
3.56 KB

This patch corrects problem above. When a user does not have view or post comment privileges, a message will tell them to login or register.

In addition, this patch also adds a usability feature. When a user is denied comment access privilges but has post privilges, a message tells them to login. Prior to this patch, users were getting with this combination of permissions got a mixed message. On the one hand they would sed an "add comment" link but when they clicked it, they'd get a page telling them they could not post a comment.

There is another usability feature to this patch which tells user to either login or register to either "view" or "post" comments depending on what permissions they have.

Dries’s picture

Status: Needs review » Needs work

You seem to be translating 'post' and 'view' twice ...

Steve Dondley’s picture

Can you please tell me if there is a Drupal similar to the what we do with sql queries? It might look something like:

some_function(t('tranlate this string with a %s variable in it'), $post);

Steve Dondley’s picture

Status: Needs work » Needs review
FileSize
3.67 KB

OK, here's a revision to the problem Dries' pointed out. I also improved the naming of a variable to make what it does more obvious.

killes@www.drop.org’s picture

Status: Needs review » Needs work

t('login to %forbid_action comments', array('%login' => url('user/login')

Doesn't cut it.

Steve Dondley’s picture

Status: Needs work » Needs review
FileSize
3.93 KB

OK, here's another revision.

Steve Dondley’s picture

FileSize
4.06 KB

rerolled per killes request

Steve Dondley’s picture

FileSize
4.06 KB

rerolled without error this time! seems to work.

Steve Dondley’s picture

FileSize
3.85 KB

need to test patches better. another bug found.

moshe weitzman’s picture

Status: Needs review » Needs work

i can't reproduce the front page problem, but even so some of these usability enhancements are nice. please reroll if possible. this section of code just changed.

Jaza’s picture

Version: x.y.z » 6.x-dev

Bug still seems to be present in Drupal 5. Moving to 6.x-dev queue.

Steve Dondley’s picture

Status: Needs work » Needs review
FileSize
4.65 KB

Over 2 years later, I've rerolled. Better late than never.

catch’s picture

Status: Needs review » Needs work

Needs yet another re-roll.

JirkaRybka’s picture

I have quite oposite problem: The link is long, and makes really no sense on frontpage, because it's annoyingly repeated on all the exposed nodes, and if users are able/encouraged to comment without reading the full node (see the link below for more background), site fills up with low-quality/stupid comments. So I proposed to make the behavior configurable (at least), at http://drupal.org/node/169938 - I marked it as 7.x though, since it's a feature. If the link to 'login or register' should be ever shown on front page, then I'll vote for showing it only ONCE, not per-node.

Just wanted to point out a related issue...

salvis’s picture

-1 to putting those ugly links back on the front page. That'd be like spamming your own front page...

JirkaRybka’s picture

Assigned: Steve Dondley » Unassigned

How was that supposed to help this issue/bug/patch? Reverting status changes.

EDIT: I was fixing status changes after an unrelated spam post, which seems to be deleted now. This my reply, being solely to the deleted post, may be deleted too, now. I didn't want to unassign, but I was unable to properly re-assign after that (now gone) spammer's change. Sorry for that part.

salvis’s picture

(OT: @JirkaRybka : Your best course of action is to report the spam: #558448: Comment spam -- we certainly don't want to keep the spam nor the spammer, and it's usually taken care of within a few minutes. I asked to have your comment removed, too, but that may have slipped through the cracks...)

JirkaRybka’s picture

Re: #23 - Thanks for advice.

silverwing’s picture

spam cleanup :(

silverwing’s picture

spam cleanup... again

silverwing’s picture

Status: Needs work » Closed (won't fix)

Since this post is nothing more than a spam magnet, plus the age of the post and lack of real updates to it, I'm marking it as closed (won't fix) and closing comments.

Feel free to open a new issue if there is still a problem.