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

Not possible to edit incoming Fediverse comments #687

Closed
janboddez opened this issue Feb 7, 2024 · 2 comments
Closed

Not possible to edit incoming Fediverse comments #687

janboddez opened this issue Feb 7, 2024 · 2 comments
Labels
Needs triage [Type] Bug Something isn't working

Comments

@janboddez
Copy link
Contributor

janboddez commented Feb 7, 2024

Quick summary

Another thing (beside the missing reply link) I noticed when using the latest master (or, at least yesterday's version), is that an admin can no longer edit a comment that came from the Fediverse.

Steps to reproduce

  1. Use Mastodon to comment on a post/previous comment.
  2. Log into WP.
  3. Notice how you can only (un)approve and trash the comment, but not edit it.

What you expected to happen

I'd expect to still be able to edit the comment (typos, brevity ...). It's my site, after all. Even if it is considered "cheating." E.g., maybe I'd want to shorten a specific comment, and add a "read more" link back to its origin or something.

What actually happened

The Edit link disappeared. Came back when v2.0.1 was reactivated.

I'm guessing this is by design. (No "cheating"!) A Mastodon admin also can't easily (without hacking the database) change incoming statuses. But it still came unexpected.

I was also looking to add a comment meta box (to the screen which I can no longer access for these comments), where I can easily view its origin, avatar URL, etc., similar to how Webmention does it. So that also isn't possible when access to this screen is denied even for admins.

Impact

One

Available workarounds?

No but the platform is still usable

Logs or notes

Additional info: I also got this Query Monitor (a different plugin, I know!) error: PHP Fatal error: Uncaught TypeError: QueryMonitor::filter_user_has_cap(): Argument #1 ($user_caps) must be of type array, bool given, called in /.../wp-includes/class-wp-hook.php on line 324 and defined in /.../wp-content/plugins/query-monitor/classes/QueryMonitor.php:111

This happened when I tried to still access the Edit Comment screen for the comment in question. Wonder if this could be an (unintended) bug.

@janboddez janboddez added [Type] Bug Something isn't working Needs triage labels Feb 7, 2024
@janboddez janboddez changed the title Not possible to edit Fediverse comments Not possible to edit incoming Fediverse comments Feb 7, 2024
@pfefferle
Copy link
Member

pfefferle commented Feb 8, 2024

That is, to be honest, how it should be... even if it is your site, it is a comment by someone else that is only "cached" on your site... I had long discussions (which were sometimes quite harsh) on Mastodon, how the WordPress plugin handles things differently than on social media...

We can discuss a better way to disable it, but I would love to keep it as default, but still open for discussions.

You can disable the new behaviour by removing the following filters:

\remove_action( 'load-comment.php', array( '\Activitypub\Admin', 'edit_comment' ) );
\remove_filter( 'comment_row_actions', array( '\Activitypub\Admin', 'comment_row_actions' ), 10 );

@janboddez
Copy link
Contributor Author

Ah, that's kind of what I expected. No worries then, and good to know there's an "easy" workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs triage [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants