使用Blogger API插入的某些帖子未显示在主页上 [英] Some posts inserted using Blogger API not displayed on main page
问题描述
我正在使用Blogger API插入帖子.浏览以下博客以了解问题所在:
I am using Blogger API to insert posts. Go through the following blog to understand the problem:
链接: https://post-testing123.blogspot.com/
在此博客中,我有7篇文章:
In this blog I have 7 posts:
5个标题格式为标题#no"-的帖子是通过API请求创建的.
5 posts with title of format 'Title #no'- are created with API request.
2个标题格式为"Manual #no"-的帖子是手动创建的.
2 posts with title of format 'Manual #no'- are created manually.
在API帖子之前创建了手动帖子.
Manual posts were created before API posts.
在此博客中,我将要显示在主页上的帖子数设置为3.
In this blog, I have set the number of posts to be displayed on the main page to 3.
因此,在主页上,可以看到使用API创建的5篇帖子中的3篇.
So, on main page 3 out of 5 posts created with API are visible.
单击较旧"时,仅显示2个手动帖子,而不显示剩余的2个API帖子.
On clicking on Older, only the 2 manual posts are displayed and the 2 API posts left are not displayed.
在存档中,所有7个帖子都会显示.
In archives all 7 posts are displayed.
如果我将要显示在主页上的帖子数设置为30之类的大数字. 然后,所有7个帖子都会正确显示.
And if I set the number of posts to be displayed on the main page to a large number like 30. Then, all 7 posts are displayed correctly.
我尝试过更改主题,但是没有用.
I have tried changing the theme but it doesn't work.
推荐答案
我找到了原因,这是Blogger中的错误.
I found the reason for this, it is a bug in Blogger.
当两个或多个帖子具有相同的时间戳(同一分钟,而不是相同的秒或毫秒)时,就会发生这种情况.
It occurs when two or more posts have same timestamp (Same minute, not same seconds or milliseconds).
因此,当您使用API(尤其是使用Google Apps脚本)发布信息时,很多帖子可能具有相同的时间戳.
So, when you post using API (especially using Google Apps Script), a lot of your posts are likely to have the same the timestamp.
类似的内容在这里说明:
Something similar is stated here:
https://support.google.com/blogger/thread/2238679?hl = zh-CN& authuser = 0
希望有帮助.
这篇关于使用Blogger API插入的某些帖子未显示在主页上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!