#311 closed enhancement (fixed)
trackbacks get written to DB with empty values
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
trackbacks to posts never show up in the blog, but they are in the databse. Looking at wordpress_comments you can see all trackbacks have a post_ID of "0" and almost all other values are empty.
The reason for that is wp-trackback.php and wp-includes/functions-post.php make inconsistant use of variables. wp-trackback.php uses comment_post_id, wp-includes/functions-post.php uses both comment_post_id and comment_post_ID. The final insert into the database uses comment_post_ID, and so does wp-comments-post.php. That is why comments get written into database with the correct ID and trackbacks with an ID of "0".
While the variables comment_author, comment_author_email, comment_author_url, comment_content, comment_type still have the correct values in wp-trackback.php those values get lost in wp-includes/functions-post.php. this only happens for trackbacks and not for comments.
And btw.: wp-trackback.php uses commment_author (with 3 m) instead of comment_author.
Attachments (3)
Change History (7)
#3
@
21 years ago
I missed a thing... check_comment is testing for $url, but the insert-statement is using $tb_url. Which obviously works well with comments?! The patch above is not linking the trackback for that reason.
The two attached diffs make trackback work for me.
Comments and trackbacks seem to use a complete different set of variable names, comment uses author, email, url, and trackback comment_author, comment_author_email, comment_author_url etc.