Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Spam comments federate and can't be deleted #18

Open
kvibber opened this issue Dec 21, 2018 · 3 comments
Open

Spam comments federate and can't be deleted #18

kvibber opened this issue Dec 21, 2018 · 3 comments

Comments

@kvibber
Copy link

kvibber commented Dec 21, 2018

Discovered an interesting one now that I've got Pterotype on my main blog, which is a bit of a spam magnet:

Wordpress comments in the spam folder show up in the ActivityPub feed and are visible in Mastodon.

And you can't permanently delete a comment due to a FK constraint error. That includes clicking "Delete Permanently," emptying the spam folder, or emptying the trash. The error is this:

WordPress database error Cannot delete or update a parent row: a foreign key constraint fails (`<dbname>`.`<dbprefix>pterotype_comments`, CONSTRAINT `<dbprefix>pterotype_comments_ibfk_1` FOREIGN KEY (`comment_id`) REFERENCES `<dbprefix>comments` (`comment_ID`)) for query DELETE FROM `<dbprefix>comments` WHERE `comment_ID` = 285606 made by do_action('wp_ajax_delete-comment'), WP_Hook->do_action, WP_Hook->apply_filters, wp_ajax_delete_comment, wp_delete_comment

It seems to apply to comments that have been made since Pterotype has been installed, regardless of whether the post they're attached to exists in the ActivityPub representation.

Unfortunately you can't move a comment from Spam to Trash to get it to disappear from the federated view - you can only delete it permanently (which fails due to the FK error) or mark it as Not Spam (which will mis-train your spam filter) and then move it to the trash.

@jdormit
Copy link
Collaborator

jdormit commented Jan 1, 2019

Oh yikes. That's pretty bad. Sorry about this. My time is pretty limited this month, so if this is affecting your main blog I would recommend deactivating Pterotype until I can get to a fix, which likely won't be until February. 😞

@DeadSuperHero
Copy link

I wanted to also add my 2 cents, as this is now affecting We Distribute. The good news is that the spam comments do not show up locally, but it was pointed out by a Friendica user today that the comments are there, and cannot be deleted.

Example: https://pirati.ca/display/0b0dde584fb2762afb0701a40ffe3195f7280f35

Trying to delete the spam comments results in a flash of red on the specific comment:

image

The error message comes up: Something went wrong. with no additional context.

@jdormit
Copy link
Collaborator

jdormit commented Dec 3, 2019

Hey @DeadSuperHero. Thanks for posting this here.

The last time we chatted I had just gotten a new job and didn't have time for further work on Pterotype, and I'm sorry to say the situation hasn't improved. I won't be able to do any further Pterotype development in the foreseeable future.

I'm going to archive this repository (for now). I have some ideas floating around in my head for a much simpler, easier to maintain version of this plugin, but they will have to remain in my head for a while longer.

Best wishes with We Distribute - keep fighting the good fight for the federated web!

Jeremy D.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants