Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#19858 closed defect (bug) (duplicate)

Close comments on attached images

Reported by: dohman Owned by:
Priority: normal Milestone:
Component: Media Version: 3.2
Severity: normal Keywords: has-patch close
Cc: Focuses:

Description

In posts, for gallery images and individual images which open in an attachment page when clicked, the image attachment page does not close comments after the designated xx days as the original post does.

This creates a pile of spam to manage for users that rely on closed comments after xx days and post lots of images.

You can replicate the problem with these steps:
1) In Discussion Settings: set comments to close after 1 day. 'Automatically close comments on articles older than 1 days'

2)Create a post with publish date 2 days ago. Insert an image or gallery which opens in in an attachment page, not just as the image file.

3) The post will have comments closed.

4) The image attachment page will still have comments open.

Here's a test post of mine. Notice the comments closed on the post but still open for the images.
​http://hackhappy.wordpress.com/2012/01/17/image-attachment-comment-test/

Bottom Line: Comments should also close after xx days for image attachments, just as the post does. Users reasonably expect this.

Check the post type for image attachment page. It may be marked as a regular page as pages are not controlled by this setting.

Attachments (2)

19858.diff​ (896 bytes ) - added by nacin 15 years ago.
19858.2.diff​ (1.5 KB ) - added by Mamaduka 15 years ago.

Download all attachments as: .zip

Change History (17)

#1 @nacin
15 years ago

  • Milestone Awaiting Review → 3.4
  • Version → 3.2

Caused by #16090.

@nacin
15 years ago

#2 follow-up: @nacin
15 years ago

19858.diff​ simply adds 'attachment' to the array of post types to be closed. It's kind of weak — we should probably check the parent of the attachment to ensure it is either 0 or a post type of 'post' (the filter result) before continuing.

#3 in reply to: ↑ 2 @westi
15 years ago

Replying to nacin:

19858.diff​ simply adds 'attachment' to the array of post types to be closed. It's kind of weak — we should probably check the parent of the attachment to ensure it is either 0 or a post type of 'post' (the filter result) before continuing.

Maybe we should be using the status of inherit to mean we look at the parent in this filter instead?

So if post-status is inherit we look at the parent's post type and date

#5 @CoenJacobs
15 years ago

  • Cc coenjacobs@… added

#6 @nacin
15 years ago

  • Keywords needs-patch added

get_post_status() could be used here to check inherit-ness. Needs patch.

#7 @nacin
15 years ago

  • Milestone 3.4 → Future Release

#8 @Mamaduka
15 years ago

  • Cc georgemamadashvili@… added

@Mamaduka
15 years ago

#9 @Mamaduka
15 years ago

Attached patch with inherit-ness check.

#10 @Mamaduka
14 years ago

  • Keywords has-patch added; needs-patch removed

#11 follow-up: @anonymized_126485
14 years ago

The Settings > Discussion menu should have another checkbox, "Allow people to post comments on new attachments." The "attachment pages" are quite well hidden from most viewers and admins, and on most sites they are accessible only to spambots. Attachment comments thus should be globally disallowable even if a site permits posts to have comments.

#12 in reply to: ↑ 11 @helenyhou
14 years ago

Replying to wlindley:

The Settings > Discussion menu should have another checkbox, "Allow people to post comments on new attachments."

I don't think another option is needed here, and I think this ticket is about automatically closing comments after X days. Also related to your idea, and may very well take care of it: #21391

#13 @ocean90
13 years ago

  • Keywords close added

For the same reason as in comment ticket:8177:33 attachment posts shouldn't be auto closed by default.

You can easily adjust this by the close_comments_for_post_types filter.

Replying to wlindley:

The Settings > Discussion menu should have another checkbox,…

See #12991.

#14 @SergeyBiryukov
13 years ago

This sounds like a duplicate of #8177 to me.

#15 @wonderboymusic
12 years ago

  • Milestone Future Release
  • Resolution → duplicate
  • Status new → closed

Duplicate of #8177.

Note: See TracTickets for help on using tickets.