I’ve posted a report to firstname.lastname@example.org, but figured someone here in the community may have some insights as well.
I’m having strange issues with my latest post. On my blog, micro.blog feed, and mastodon feed, I see a duplicate of it and that duplicate is many versions old.
Originally I made a draft. I later published it, but immediately unpublished it because I forgot to schedule with a current date. Then I scheduled it, then rescheduled it a couple of times. So perhaps that dances broke something in the system.
- If I edit/save a previous post it appears to fix the duplication issue
- I can manually delete the duplicate micro.blog feed entry
- I can not work out how to fix the mastodon feed
However, it seems that any sort of blog update, or post, etc retriggers the duplication and I have to do the whole dance again. And sometimes this triggers an old outdated version of my navigation links to appear as well. It’s… perplexing.
Any ideas? Thanks in advance.
I am seeing this also. I can’t figure out how to remove the duplicate post. In my case, my blog is new and I only have the one post, but it shows up twice.
But since I just have the one post my workaround was to just delete it and create it again.
Hmmm. I think I’m only seeing this on the latest post I made. I haven’t seen any previous posts do it (I keep editing an older post as part of my ritual for trying to fix this post).
But I’d prefer not to just delete and repost it, unless there is no other option. Especially if there’s a genuine bug. Hopefully, I can help it be found.
If you go to the Posts page in the web app, do you see any duplicates there? If so, make sure to delete them.
Then, this is a kind of “turn it off and on again” thing to do, but you could try rebuilding your site by navigating to Account → View Logs and hit the Rebuild button.
There’s definitely only one copy in the Posts tab. That was the first thing I looked for. Thanks for the rebuild tip. I was wondering where that might be.
Rebuilding fixes the immediate issue, but as soon as I do anything else it’s triggered again. e.g. I just rebuild, which fixed the issue. Then I edited the About page, and it’s back.
I had a duplicate post issue when I changed its date. It’s gone now but for a day or so, it appeared under both dates.
Manton responded to me saying somehow an older draft/copy got cached somehow, so regenerating the page would sometimes resurface it. He cleared the cache to fix it. I’m not sure if that’s something I could have done myself. But it should be fixed now.
I’ll provide a few more details here for people who are curious how things work behind the scenes… If you don’t want the technical explanation, skip this.
- When you post to Micro.blog, Micro.blog keeps the post in a database. When it’s time to publish, it writes the post to a Markdown file for processing by Hugo.
- As an optimization, Micro.blog keeps most posts cached as Markdown files on each web app server. That way, it can quickly re-process everything. It clears this cache automatically when you choose the “Rebuild” button on the logs page, or after a few days.
- When deleting a post, Micro.blog clears the post from the on-disk cache. Currently we have 3 app servers, so it needs to sync this deletion across every server. There must be a bug where this deletion sometimes fails, leaving around a stale cached Markdown file on 1 or more servers.
- If a stale Markdown file is kept around, the “Rebuild” button will wipe it out but only from the specific app server that is currently being used to publish your blog. So it might pop back up again.
Of course, you shouldn’t have to know any of this. When I fix this lingering bug, hopefully all of this will fade away to an implementation detail again.