Open raamdev opened 7 years ago
Interestingly these "loves" (and I suspect other reactions) from Facebook aren't parsed as webmentions (I'm guessing by semantic linkbacks plugin) as the comment_type in wp_comments is empty rather than "webmention", but they are assigned a semantic_linkbacks_type of "reply". I suspect that this is why they're not categorized in the webmention section. I'm not sure what the bug is for giving all the names the same URL....
I confirmed that comment_type
in wp_comments
is empty for those "Loves" on my end too. Now the question is what to do about them...
Independent Publisher specifically calls wp_list_comments()
with 'type' => 'comment'
, but it looks like the reason why those "Loves" with a blank comment type get thrown into the comments section is that WordPress forces any comments with a blank comment_type
to be treated as if comment_type
was set to comment
.
So, it looks like there's not a whole lot that I can do to fix this issue in the theme... it looks like it's an issue with the Semantic Linkbacks plugin... or whatever is storing those "Loves" in the comment table with an empty comment_type
.
I'm still not sure what bug is causing all of the subsequent mentions to have the same URL though... my only suspicion at the moment is this line where I assign $GLOBALS['comment'] = $comment
. I'm wondering if somehow that causes all of the subsequent webmentions to be pulling the URL data from the "Love"... not sure how that makes sense though. I need to do some more testing.
@raamdev I know that @dshanske has been recently been doing some work on the Semantic Linkback Plugin, so you might mention this to him/put in an issue into the github repo to see what can be done to "fix" this. There are some quirky subtleties to how it works vis-a-vis WordPress' comment system to make these types of webmentions display easily/properly.
A bit more information:
The issue with the URLs of all the webmentions changing to the same URL only occurs when the very last approved comment is one of those comments created by the Webmentions plugin (or is it the Semantic Linkbacks plugin... I don't know) with a blank comment_type
. If there are regular comments after that 'bad' comment, then all of the Webmentions behave normally.
What's also odd is that I tried manually changing comment_type
in the database to comment
for this 'problematic' comment, so that it effectively resembled a normal comment, but surprisingly that did not solve the issue with all of the webmentions getting the same URL as this 'bad' comment... weird!
I just spent about 30 minutes digging through the source for the Webmentions plugin and the Semantic Linkbacks plugin, but nothing is jumping out at me. I need to spend a lot more time understanding those two codebases and getting a better handle on how those two plugins interact.
https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/55 relates to your seeing this as a standard "reply" rather than a "webmention". You may want to weigh in on the discussion or watch it for a forthcoming solution. I suspect it's something that other themes may have trouble supporting in the future as well.
I think the discussion atI know you'd also connected with @dshanske in the Indieweb chat too, so hopefully that helped a bit.
https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/60
Also discussed a bit in the indiewebcamp-wordpress IRC today: It's a missing feature on Semantic Linkbacks Reacji are classified as replies. Replies = comments. Solution. Support Reacji.
Facebook "Loves", like the one shown in the screenshot below (here's the link to the 'Love' on Facebook), should be showing up with the rest of the webmentions, but instead it's showing up like a regular comment.
Also, when this "Love" appears as a comment, it seems to break the rest of the webmentions; as noted in the screenshot, all of the names of people who mentioned the post are suddenly linked to the same link (they're all linked to the person who did the "Love" on Facebook).
The quick-fix is to unapprove any "Loves" so that they just don't show up at all—then the rest of the webmentions work as expected.