Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webmentions are not handled properly by the comment blocks #58366

Open
carolinan opened this issue Jan 29, 2024 · 2 comments
Open

Webmentions are not handled properly by the comment blocks #58366

carolinan opened this issue Jan 29, 2024 · 2 comments
Labels
[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [Type] Enhancement A suggestion for improvement.

Comments

@carolinan
Copy link
Contributor

Description

This was originally reported on core trac: https://core.trac.wordpress.org/ticket/59739
and the support forum https://wordpress.org/support/topic/separate-webmention-types-from-comments/

Because it concerns feature parity between the comments block and the classic comment type filters, I am moving it here.

With the new comments template for Twenty Twenty-Three, webmentions are not properly filtered: they appear both as comment and like or repost…
Expected result: if a comment is a like/repost webmention, the comment is hidden, but the like/repost webmention is shown accordingly.
I use the Webmention plugin by Pfefferle (+ IndieWeb and Syndication Links plugins). This means one of these plugins might probably have to handle all or part of the styling/behavior.

Step-by-step reproduction instructions

Reproduction steps were not provided by the reported, testing is needed.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan carolinan added [Type] Enhancement A suggestion for improvement. [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop labels Jan 29, 2024
@cybeardjm
Copy link

How to reproduce:

  • I receive webmentions from Mastodon to WordPress via Bridgy.
  • webmentions can be comments, likes or reposts.
  • Prior to Twenty Twenty-Three, webmentions were properly managed by the comments engine, and properly separated into comments, likes, reposts, under the corresponding header.
  • Since Twenty Twenty-Three, webmentions such as likes or reposts appear twice: as a like or repost under the proper section AND as a comment that just says "Bridgy Response" with avatar etc.

The "Bridgy Response" comment should be filtered out and hidden by the comments block, allowing only the proper likes and reposts to be shown.

PS: had to use another extension (Indieblocks by @janboddez ) to make the problem "disappear" for now.

@janboddez
Copy link
Contributor

janboddez commented Jan 29, 2024

I'm fairly sure this is an "issue" with the Webmention plugin: it filters out, I believe, the "like/repost/etc." comments and shows them separately. Except somehow it fails at removing them from the "actual comments" list.

I believe it works OK with classic themes, however.

The IndieBlocks plugin uses a block render callback to filter the output of the comments block and aims to be compatible, at least in this regard, with the Webmention plugin. Edit: Just had another look and it looks like IndieBlocks really only filters comments using the pre_get_comments hook. It also filters the comment count (in order to count only the "real" comments).

In short, the Webmention plugin, on its own, may not be 100% compatible with block themes. Looks like it may be missing a pre_get_comments, or similar, callback. (I seem to remember it does its "filtering" using a custom comment walker or so, which I think may be ignored by the comments block?)

Doubt this is a Gutenberg issue, though, since it can be made to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants