(bug): publishing a blog that was saved as a draft or "unlisted" does not generate activity post
Summary
Many bloggers like to save drafts or publish blogs as unlisted before making them public so they can work on them. If you save a draft, or publish as unlisted, and eventually try to publish the blog to public, then it does not generate an activity post.
Steps to reproduce
-
Write a blog
-
Save as draft (can try doing this twice)
-
go back to edit blog and publish as public.
-
No activity post created
-
Write a blog
-
Publish as unlisted
-
go back and edit blog and publish as public
-
no activity post created
Platform information
All
What is the expected correct behavior?
An activity post should be created everytime you publish a blog as "Pubic" no matter what the state of the blog was prior.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
assigned to @gthouret
added Priority::2 - Normal label
added Product::Blogs label
changed weight to 2
changed milestone to %sprint: Interesting Iguana
unassigned @eiennohi
added Status::InProgress label
- Developer
I'm not able to reproduce this bug report in production or dev environment.
What I do see in production is when blog posts have been created in draft they don't appear in the 'blog' sidebar of my page. This does not happen in dev environment.
I captured the URL slug of the draft blogs to get back to them, edit and then publish. Once published they appeared in my newsfeed.
- Developer
If I visit https://www.minds.com/guythouret/blogs I see all posts, draft and published.
- Owner
@gthouret it is creating a newsfeed post? This is a consistent issue for me when blogging. If you save it as unlisted or a draft, and then try to publish it to the public, it does not create a newsfeed post. Similarly, if you edit the blog after publishing, such as the title or banner, the edits do not take affect on the newsfeed post.
- Owner
@gthouret okay, also try publishing a blog as unlisted, then going to the blog and editing it to make it public and then publishing again — don’t think it creates the activity post.
Also, the save draft button usually disappears after you use it two times. I can try to replicate if you have issues but these are annoying bugs that have lingered.
Edited by Jack Ottman - Developer
Edited title + text and now it's disappeared from newsfeed but the changes are visible on the blog page
- Developer
Right, according to the code we publish activity when creating a new public blog post OR editing a public blog post from draft => published.
If a post was published (not draft) as unlisted and we edit to public, no activity gets created.
The logic for creating the activity needs updating and could do with being a bit clearer there.
Edited by Guy Thouret - Owner
Yeah, that makes sense. Publishing something as "unlisted" should not even be necessary with "Save Draft", but the problem is the "Save Draft" button disappears after you use it twice.
- Owner
All good. You're getting deep into some of the legacy stuff early :)
A lot of it I think has to do with the "edit" function being different for the media page (full blog page) and the activity post (newsfeed post of the blog). Really these things should be synchronized and everything should update on both versions when changes are made. I think this is the reason that unlisted blogs do not create an activity post when you publish it -- it requires an edit, and then the edit is not recognized by the activity post.
But for starters, the key is making sure that 1) the save draft button never disappears and 2) if you post something as "unlisted" and then go edit it and post it as "public" that it generates an activity post at that time.
Let me know if you have any questions