writefreely icon indicating copy to clipboard operation
writefreely copied to clipboard

Unpublishing a post doesn't delete federated post

Open Kansattica opened this issue 6 years ago • 2 comments

Describe the bug

Kind of the opposite of #9 - when a post is deleted on Writefreely, it is correctly deleted from the federated feed (my view on Mastodon). However, moving a post from published to draft status does not delete the federated post, and when the post is moved back from draft to published, the federated post stays- and now has the wrong URL!

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Create a post
  2. Publish it
  3. Look at the federated feed on Mastodon or whatever and notice the post
  4. Move the post from published to draft
  5. Notice that the post is still there on the federated feed, but the link now 404s
  6. Move the post from draft back to published
  7. The link may still work, but if the URL was regenerated, there's now a broken link in the federated feed that you have to delete the post to fix.

My feed at @[email protected] shows the issue- the post for Happy Camper Pt. 3 links to https://perfect.hypnovir.us/happy-camper-pt-78pl, while the correct link is now (link is NSFW if your boss has my fetishes): https://perfect.hypnovir.us/happy-camper-pt-k15s

Expected behavior

Moving a post to draft should delete the corresponding federated post.

Application configuration

  • Single mode or Multi-user mode? Single
  • Database? [mysql/sqlite] sqlite
  • Open registration? [yes/no] no
  • Federation enabled? [yes/no] yes

Version or last commit: ./writefreely -v prints: WriteFreely **0.10.0**

Kansattica avatar Jul 07 '19 10:07 Kansattica

Thanks for the report! This is indeed something we'll want to fix.

We're also tracking the issue in T535 -- see that task and this comment on #79 for details on roadblocks and potential routes toward a fix.

thebaer avatar Jul 07 '19 17:07 thebaer

Thank you. For what it's worth, I think the best option is simply to delete the federated post on unpublish and create a new post on publish, since it's the only way to ensure you don't get a phantom post with a broken link.

The other route is something like "delete the post if it'll be republished with a different URL, and leave it otherwise", but that's a pretty weird and unintuitive behavior.

Kansattica avatar Jul 07 '19 23:07 Kansattica