Ticket #311 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

trackbacks get written to DB with empty values

Reported by: bronski Assigned to: michel v
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords:
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

0000311-functions-post.diff (1.2 kB) - added by bronski on 05/21/05 06:28:50.
0000311-functions-post2.diff (0.5 kB) - added by bronski on 05/21/05 06:28:50.
0000311-wp-trackback.diff (2.7 kB) - added by bronski on 05/21/05 06:28:50.

Change History

09/22/04 14:39:19 changed by bronski

09/22/04 16:32:12 changed by bronski

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.

09/22/04 16:46:48 changed by bronski

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.

09/22/04 19:48:04 changed by anonymousbugger

Thank you for the patches and for bringing this to our attention!

09/22/04 20:47:41 changed by michel v

  • owner changed from anonymous to michel v.
  • status changed from new to closed.
  • resolution changed from 10 to 20.

(The previous comment was by me, heh.) Someone feel free to close this bug once it has been verified that the issues are not present anymore, I'm marking it fixed for now.

12/09/04 01:32:56 changed by 2fargon

  • status changed from closed to closed.

05/21/05 06:28:50 changed by bronski

  • attachment 0000311-wp-trackback.diff added.