#8177 closed defect (bug) (wontfix)
Comments disabled in post but not in media gallery
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Gallery | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
The options to "allow comments on this post" and "allow trackbacks and pingbacks on this post" have been deselected. The post will then return the expected message "Both comments and pings are currently closed". (ie. http://localhost/wordpress/?p=42) However, when selecting an image from an embedded native Gallery of that post, the image redirects to an attachment_id (ie. http://localhost/wordpress/?attachment_id=38)and still has a comments field. There is no decipherable means to disable comments on attachments through the native gallery.
If this is the expected behavior, I would believe that if a post may disable comments, then all of its content should be disabled.
Related: #9839 Enable/Disable comments on a per item bases (some attachments don't have parents)
Attachments (4)
Change History (39)
#2
@
16 years ago
- Cc janbrasna added
- Keywords image gallery attachment commenting discussion preference added
Confirming the bug in 2.7-beta3-9922 however not sure about possible solutions. Should commenting preferences be inherited from the attachment's parent post? Or set explicitly per attachment?
#4
@
16 years ago
- Keywords reporter-feedback added; dev-feedback 2nd-opinion removed
Please let us know what theme you are using.
#5
@
16 years ago
I dont think its a theme bug, Well, If it is, Its because the bug exists in the default theme.
<?php if ('open' == $post->comment_status) : ?>
The theme only checks that the current post's(attachment) comment status is open, And closing the status on a parent doesnt follow through to children.
A potential solution would be to do a lookup on the parent and check its comment_status, and set the attachment to the same during the query.
#6
@
16 years ago
- Milestone changed from 2.7 to 2.8
We should add parent checking to pings_open() and comments_open() and encourage themes to use those. There is no time to do this for 2.7, however. Postponing to 2.8.
#7
@
16 years ago
The problem probably starts at the point when the attachment's data is pulled from DB to $post since both comment_status and ping_status are set to open
in DB.
The question is, wouldn't it be better to explicitly set the pings&comments for individual attachments directly?
#9
@
16 years ago
- Keywords has-patch needs-testing added; image gallery attachment commenting discussion preference reporter-feedback needs-patch removed
attachment 8177.diff added.
- Sets comment/ping status to the parent posts status for attachments
- Supports themes which use
if ('open' == $post->comment_status)
instead of comments_open()
- Note, The changes to
_close_comments_for_old_posts
are so the closed-comments-on-the-fly work for the front page commenting links.. Included in this patch simply for review sake, The functionality for this ticket works without it.
#11
@
16 years ago
i'm not a big fan of this patch. imo, the open/closed status for comments should have an additional value, inherit, which does just that.
#13
@
16 years ago
Currently comments on attachments respect the close_comments_for_old_posts
setting. Perhaps all that's needed is to check whether comments are open on the parent post when outputting an attachment post.
#14
@
16 years ago
Perhaps all that's needed is to check whether comments are open on the parent post when outputting an attachment post.
Thats pretty much what the patch does.. Except, It does it when the attachment post object is loaded, so that it also affects front-page links instead of incorrectly showing "Comment now!" when comments are closed.
#15
@
16 years ago
Hmm, isn't that a configuration issue? I mean, the attachment actually has comments according to the comment settings data. Shouldn't the date be set properly while updating the parent post? Or can attachment be shared between multiple posts and therefore there is need to handle that dynamically?
#16
@
16 years ago
. Shouldn't the date be set properly while updating the parent post?
the parent posts's setting can be dynamic, Ie. Close old comments doesnt change it in hte DB, it happens on the PHP-level to reduce database load.
#17
@
16 years ago
- Keywords early added
- Milestone changed from 2.8 to 2.9
Punting per IRC discussion.
Things have been this way for months, it can stay that way for another few months. A minuscule plugin can fix it in the meanwhile.
#18
@
16 years ago
I just checked. The default behavior is that (genreal option to allow comments is set to on), that when you create a post and add a gallery (wether or not the post has comments switched on in post settings) the attachments _ever_ have the option to comment on.
I would not only suggest to move this request into the plugin domain but into the theme domain. If this bevhavior is not intented, the theme must check for the attachements if the parent post allows comments or not.
The other route would be to extend the attachment editor having it's own comment setting input controls. Having or not that feature should clarify wether that is wanted or not.
See current patch for some code fragments on how to check for attachemnts parent open status.
Personally, I do not want to loose the ability to have comments on attachments but not on the parent post.
Resolve as "won't fix"?
#19
@
16 years ago
- Keywords 2nd-opinion added; has-patch tested commit early removed
2.9 will get some media attention i believe.
I'd like to see an option added in 2.9 for the settings, as in, "Attachments inherit parents pingback/commenting settings" with per-image(& possible per-gallery) comment/pingback handling as well.
Leaving this open for discussion in 2.9 depending on where the UI goes.
#20
@
16 years ago
- Keywords needs-patch added; dev-feedback 2nd-opinion removed
let's leave it open then
#22
@
15 years ago
- Milestone changed from 3.0 to Future Release
Punting again, due to limited traction on the media items.
#24
@
14 years ago
With probable media enhancements in 3.3 is there any chance of this making someone's todo list?
#25
@
12 years ago
- Keywords has-patch added; needs-patch removed
Refreshed @dd32's patch.
Since 3.5 is almost out the door, maybe this could be something for 3.6?
The issue is still current, the patch still works! :)
#28
@
12 years ago
If we're removing $query->is_singular()
check, I guess the $query
parameter (added in [18836]) should be removed as well, since it's not used anywhere else.
#33
@
12 years ago
I talked with ocean90 in IRC about it and we agree that we should probably not add that functionality after all.
Since 3.5, attachments can not only be attached to more than one post, but they now also offer the ability to change their discussion settings individually, on a per attachment basis.
What do you think, Sergey?
What theme are you using? This is probably a theme bug.