[wp-trac] [WordPress Trac] #35337: Global $post is null in "comment_post" and "pre_comment_on_post" hooks
WordPress Trac
noreply at wordpress.org
Thu Jan 7 04:40:18 UTC 2016
#35337: Global $post is null in "comment_post" and "pre_comment_on_post" hooks
--------------------------+------------------------------
Reporter: dennis_f | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by dennis_f):
Replying to [comment:1 boonebgorges]:
> @dennis_f In what context is `comment_post` firing? Is it when
submitting a comment via wp-comment-post.php? Or for all uses of
`wp_new_comment()`? (eg via AJAX in the Dashboard)
This happened when posing a new comment to a blog post, just by using the
standard post comment form - I haven't tested it with other uses. I tested
it with different themes (including TwentyFifteen and TwentySixteen),
always with the same result.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35337#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list