Unable to programatically create blog entries
We have customized the OOTB blog, but retained the code in the various JSPs(for the time being) associated with the blog component. I have programatically created blog articles/posts under the blog - these have the same node structure and properties as that of the articles/posts created through the 'Add Entry' option present in the blog. However, the following piece of code, present inside the content.jsp of the blog's 'page' component(similar to that of /libs/social/blog/components/page/content.jsp)
blog.isEntry()
always returns false when I run the blog articles/posts that I created programatically, whereas it returns true in the articles/posts created through the 'Add Entry' option present in the blog page. I have compared the properties and node structures of both and they seem to be exact. Am I missing something when I programatically create blog entries? I cannot quite understand what exactly happens when the blog.isEntry() method is called after looking at the API documentation of com.adobe.cq.social.blog.Blog
I have printed out the BlogEntry of the blog under which I created the articles/posts programatically, by iterating the blog.getEntries() and printing them out. On doing this, I could observe that the programatically created articles/posts appeared as blog entries. So, I cannot understand why the blog.isEntry() returns false for these posts/articles.
This is a real showstopper. Please help me.
Thanks in advance
Shriram