Possible bug: Publishing Draft Posts via API v3

[email protected]
Newsgroups gmane.comp.web.blogger.api
Message-ID <[email protected]>
We're creating and interacting with Blogger blogs using the API v3 and have 
noticed some unexpected behaviour.  Under certain circumstances when a 
draft post is created, it is not assigned a permalink and its "url" 
property is just assigned the root URL of the blog (i.e. 
http://xxx.blogspot.com).  Since the post is still in draft, this may not 
be a big issue; however, when the post is published live, it needs a 
permalink assigned so that it can be viewed on the blog.  Once published, 
if the post does not receive a permalink, it cannot be viewed on its own 
page, but can be seen in the post listings with static text as its title 
(i.e. not linked).

Here's how to reproduce this behaviour and create a published blog post 
without a valid "url" property:


   1. Create a draft post without a proper "url" property assigned
      - This can be done in one of two ways:
         - Create a post via the API v3 (POST to 
         blogger/v3/blogs/<blog_id>/posts?isDraft=true, include "title" and 
         "content" properties in POST body object)
         - Create new post in the Blogger UI.  If the post is edited very 
         quickly and the save and close buttons are clicked before the post is 
         Autosaved, it will save without a valid "url" property.  A valid "url" 
         property will be assigned if the post is left to Autosave in the UI.
         You can check if the draft post has been created without a valid 
         "url" parameter by querying the list of draft posts and looking at the 
         "url" parameter for the added post.  
      2. Publish the draft post created in step one via the API
      - Using API v3, publish the draft post with the invalid "url" 
      property (POST to blogger/v3/blogs/<blog_id>/posts/<post_id>/publish)
      

You'll see the returned published post's "url" property is still set to the 
root URL of the blog and has not been assigned a valid link.  Viewing the 
blog's home page with the list of recent posts, you will see the newly 
published post, but its title will not be linked.

Has anyone seen this behaviour or know of a workaround?  If indeed this is 
a valid bug, where can it be reported?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.