Federation error with "undrafted" articles #221
Labels
No labels
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Plume/Plume#221
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was wondering why a certain post didn't show up in my Mastodon timeline.
I ran a few tests and realized: It's because it was a draft before. So from my tests, there are two scenarios:
I assume it's because the post is initially federated (without visibility) and technically edited later on, but Mastodon doesn't support editing.
Workaround so far is writing the draft until it's final, then copy the text, create a new post with it and then delete the old draft. Obviously, that's a bit lackluster. :)
Additionally, I found that changing the title between the first draft and the published draft updates the URL of the blog post, but doesn't update the link in the federated post that gets into Mastodon if you search for the URL to manually pull it in. So you can make the post title and link visible, but the link is broken, because it's pointing at the old URL.
I followed @bannisdale's workaround and deleted/re-created the post to get around it.
@kvibber there is another issue for your problem there: #207 🙂
@BaptisteGelez Thanks, I didn't see that one!
Looking at the interaction between the two bugs, it seems it would make sense to update the URL when changing a draft's title, but not when changing a published post's title.
Ideally Mastodon would support Update activities, but there is another solution: federation permalink can be ID-based instead of title-based, and a "pretty url" can be formed from a custom slug containing the title or whatever the user enters.
So, for example, I might post an article on Plume that federates out as
https://plume.example/~/trwnh/6743826481264and the title istest post. The default pretty-url slug would betest-post(but I could edit it manually totestif I wanted to, or2018/10/11/1, or2018/testpost, or whatever I wanted) and then the URL would becomehttps://plume.example/~/trwnh/test-post(or whatever i set it to)When federating that out, you would use the
idas that permalink, andurlas the slugified link. So for example:And the
contentof theCreateactivity would include theidinstead of theurl. So something like<p>$title - $id</p>at the simplest, and then it would show up in Mastodon like this:or
trwnh posted a new article:<br>$title<br>$id, and then it would show up in Mastodon like this:The important thing is that the URL that gets federated out cannot change, so it's a bad idea to use a value that can be changed. Not every implementation might support
Updateactivities, so using theidis more robust and will fail in less cases.This is now fixed, #207 is too, however @trwnh's suggestion might be a better way of handling post title update. Shall we open a new issue discussing if this should be done?
@fdb-hiroshima I can do that, if you wish.