backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Make the homepage field when anonymous commenters must/may leave their contact information configurable #4279

Open alanmels opened 4 years ago

alanmels commented 4 years ago

Description of the need When anonymous users are set to post comments, then additional configuration settings for anonymous commenting appear on the content type settings. Two of them allow anonymous authors to leave links to their homepages.

In most cases the field is abused by spammers who put ad links in that field. Despite it is possible to easily hide or remove the field using template overrides, I believe this field should be properly changed in core.

Proposed solution I would completely remove the field, however considering those rare websites which need visitors to leave their homepage links, we could make this configurable just in the same way as the comment titles are allowed or not like shown on the screenshot for proposed change.

allow-homepages

stpaultim commented 4 years ago

@alanmels - Can you provide a little more information on which homepage field you are referring to?

alanmels commented 4 years ago

@stpaultim Please see the edited post. Thanks!

stpaultim commented 4 years ago

Thanks for clarification. It helps, I understand the issue now.

I suppose that "homefield" option is a relic from the earlier days of blogs, when commenting was very frequent and people were highly motivated to comment on other blogs, because of the opportunity to promote their own blog. Now, I suspect you are correct, that mostly this is just an incentive for spammers.

I believe that Drupal 8 allows site builders to field and create their own comments types with custom field configuration (I should verify that). Whereas Backdrop currently only allows one of two options (for unauthenticated comments):

1) Name and comment or 2) Name, Email, Homepage, and Comment

There are no other options. I suspect that we can't simply remove the "Homepage" options at this stage (maybe in BD v2.0), because that would be removing an existing feature and may break existing sites (even if that feature is probably not often used). But, we could at least add another option (short of making comments entirely fieldable).

1) Name and comment 2) Name, Email, and Comment 3) Name, Email, Homepage, and Comment

I don't think that this is going to effect many users. A lot fewer sites allow comments at all, let alone anonoymous comments. But, if I did allow anonoymous comments on a blog, I think I would probably prefer to NOT have the homepage field.

I would argue, that if this is a relatively simple PR, it's worth doing. But, given that it's a relatively fringe use case/problem, I would not recommend investing too much effort for this. I'd rather look at fieldable comments in Backdrop 2.0 (or sooner, if possible).

docwilmot commented 4 years ago

How exactly do you enable that "homepage" field to get it to appear on the node type form? I just tried and cant find it on the node type form even when anon comments allowed.

stpaultim commented 4 years ago

NOTE: I've done a little more research and it appears that comments are theoretically fieldable. https://github.com/backdrop/backdrop-issues/issues/2049

But, I don't see anything in the UI to support that. Do we just need to create a UI to create custom fields on comments and is that what issue #2049 is about?

stpaultim commented 4 years ago

@docwilmot To recreate this situation you need to:

1) Change permissions to allow anonymous users to create comments. 2) Then go to any content type, make sure comments are open, and check the comments configuration. If you have allowed anonymous comments, then you will have three choices:

a) Anonymous users may not enter their contact information b) Anonymous users may leave their contact information c) Anonymous users must leave their contact information

The "Homepage" field should be visible if you select either b or c (above).

laryn commented 4 years ago

@stpaultim To edit a comment's fields and field display, it is available when configuring a content type: Screen Shot 2020-01-17 at 3 38 49 PM

Perhaps we could convert the "homepage" field to a standard field (for anyone that has selected the option and/or has used it in the past) and then remove it?

docwilmot commented 4 years ago

The "Homepage" field should be visible if you select either b or c (above).

Tried this on two sandbox sites and the field does not show.

laryn commented 4 years ago

Actually I'm having trouble getting that setting to appear on mine also.

stpaultim commented 4 years ago

@docwilmot and @laryn

You have to create a new node. Existing nodes will show the old settings. I just did this on a Tugboat sandbox. 1) Change permissions to allow anonymous users to post comments. 2) Edit POST content type to allow users to leave contact information 3) Create a new TEST POST. 4) View TEST POST as anonymous user. 5) Anonymous users will now have a homepage option on their comments

@laryn - Thanks for pointing out the UI for comment fields. I thought I had seen it before, but couldn't find it. I'm feeling very silly right now.

laryn commented 4 years ago

@stpaultim The "Allow authors to leave their homepage" checkbox just isn't showing up in the content type configuration page for me.

Screen Shot 2020-01-17 at 3 52 16 PM

stpaultim commented 4 years ago

@laryn - It doesn't say that. It says

"Anonymous users may leave their contact information"

Contact information includes homepage AND email.

laryn commented 4 years ago

Does your screen look like the one in the first post in this thread, or is that an incorrect representation?

EDIT: Figured it out. My turn to look silly. That's his proposal, not a screenshot.

stpaultim commented 4 years ago

@alanmels - I think you are correct, that a user should have the option to simply collect emails without home pages and that this entire homepage option (by default) is possibly a relic from the past. :-)

But, does this need to be fixed, given how easy it is to create your own custom fields on the comment form. If one does not like the default comment options, one can easily create their own.

I would support removing the "homepage" from contact information if we could do so without the risk of breaking existing sites. BUT, I'm not sure I see the need to ADD another option to allow what is easily achievable by simply adding custom fields to the comment entity. I could be persuaded. What do you think?

docwilmot commented 4 years ago

That's his proposal, not a screenshot.

Thats it for me too! 😄

alanmels commented 4 years ago

@stpaultim I am not sure if it's worth investing time into this as you said. For our own projects we just use custom code each time, however my concern here is for non-coder users of Backdrop, who just would like to allow commenting for anonymous users and hit spam issues because of that unfortunate field. I believe even if there are easy ways of getting around this kind of issues, Backdrop should ship with sane default settings and configuration options.