Hi Aaron,

On Thu, Oct 29, 2009 at 3:16 AM, J Aaron Farr <[email protected]> wrote:
> ...when I deploy this bundle, the post is loaded where I expect:
>
>   http://localhost:8080/content/espblog/posts/first_post.html
>
> But, this URL no longer works:
>
>   http://gandalf.local:8080/content/espblog/posts.list.html
>
> and I believe that's because 'posts' is not a sling:Folder:

For some reason the espblog sample seems to require the
nt:unstructured type for the "posts" node.

I haven't checked why, but to have that node type you can add a
posts.json file to your initial content alongside the posts folder,
samples/espblog/src/main/resources/initial-content/content/espblog/posts.json:

{
  "jcr:primaryType"="nt:unstructured"
}

in addition to your existing
samples/espblog/src/main/resources/initial-content/content/espblog/posts/first_post.json

This allows http://localhost:8888/content/espblog/posts.list.html to
work, but unfortunately the post is then missing the "created"
property that should be a date, and I don't think the initial content
mechanism allows for initializing date properties (unless you use
docview xml files for the initial content).

To really fix this, the espblog sample could be made to cope with
missing "created" properties, or we could improve the initial content
loader to better handle date properties.

-Bertrand

Reply via email to