Download & Extend

Comment form missing "Login or register" links for anonymous users

Project:Panels
Version:6.x-3.3
Component:Panel pages
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Many thanks, Merlin, for this spectacular module.

The bug:
- In Permissions, turn off "post comments" for Anonymous users
- Build a Panels page that includes a "Node being viewed" comment form
- View page as an anonymous user

Result: "Add comment" correctly appears (rather than the comment form, which only appears for Authorized users), but there is no "Login or register to post comments" (with associated links).

Expected: "Login or register to post comments" would appear along with "Add comment".

Workarounds welcome.

Comments

#1

Component:Display rendering» Panel pages

I may be misapprehending what Drupal makes available here. Is there some other way to get the "Login or register" links?

#2

What do you have providing the "add comment" link? This is not printed by the comment form pane, which would actually just print nothing if permission to post comments does not exist, I think.

#3

Status:active» postponed (maintainer needs more info)

#4

Merlinofchaos,

First, have to say I am learning and lovin panels. Thanks alot for an indispensable module.

I am new to Drupal and not a coder.

And I am having the same issue. And you hit the nail on the head as it were... what should be providing the add comment link? I have looked through panels and haven't seen anything that would.

thanks

#5

In ctools/plugins/content_types/node_context/node_comment_form.inc, the function ctools_node_comment_form_content_type_render() outputs nothing if the user can't post comments. The attached patch calls the comments module's comment_post_forbidden function which will output the Login/Register links.

AttachmentSize
comment_form.patch 625 bytes

#6

Status:postponed (maintainer needs more info)» needs review

Aha, that works.

Can we make this optional? Since panes can have settings a simple checkbox should be relatively easy.

#7

Status:needs review» needs work

/me agrees with merlin

Reroll the patch with a settings checkbox so that a) the new behavior is optional and b) it defaults to not showing Login/Register so that anyone using the old version of the pane won't suddenly have new links appearing on their site unexpectedly, and I'll commit it.

#9

Updated patch against 6.x-1.6 attached, config option to display links and it defaults to off.

AttachmentSize
comment_links.patch 1.81 KB

#10

Version:6.x-3.2» 6.x-3.3

patches from #5 and #9 have been applied to my site. But I can't find they are working for me.
theme('comment_post_forbidden', $node); just can't be executed. The option in the setting in node comment form pane has been set, yet there is no links appearing there still.
Any idea? Thanks!

Using modules: ctool 6.x-1.3 and Panels 6.x-3.3

#11

comment_post_forbidden is a theme function from the core comments module - do you have it enabled?

#12

Thanks!
Sure. Comments module enabled. I am still finding out why it is.

For "node_content" pane (node_content.inc), when the option "include node links for "add comment"..." is enabled, "Login or register to post comments" can be shown in that pane for anonymous users.
But for "comment form" (pane node_comment_form.inc), after patched, the link still can't be shown.

#13

Strange. Are you certain the patch applied? We patched and are using it on dcunited.com where it display correctly.

#14

I am new to Drupal, I do not know many things, so I'm willing to learn. Sure it displays correctly on dcunited.com?
Ioana, Bucuresti

#15

did you configure the comment form panel itself to display the links - that's what this patch adds.

see http://screencast.com/t/ODE3ZDQ0

#16

Yes, I configured the comment form panel itself to "display the links". I will try to do it in another platform to see it works or not. Thanks!

#17

Status:needs work» fixed

Other than changing the test to use empty() so that it won't throw a notice, I approve. This is committed.

#18

One note: When a patch has been moved to 'needs work' and you post an update, move it back to 'needs review' -- I did not actually see there was a new patch here until I happened to spot it in my email box.

#19

Thanks Merlin, I didn't know there was a 'needs review' status.

#20

Status:fixed» closed (fixed)

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

nobody click here