I'm working in CQ5.5 on a custom workflow in an ecma file to do the following:

Given the creation of a page of template type A, automatically create a page of template type B and populate some of the content from page A into page B. I have no problem creating the page but when I go to insert content, it is not giving me a node called test under jcr:content, like I would expect. Anyone have any ideas?

Thanks for your reply! I'm not getting an explicit error, the above code just isn't creating the node like I would expect it to, so it's kinda hard to track down exactly what is going on. I am able to successfully create the new page, but I can't create the node underneath it with jcrUtil.createPath

Did you try session.save(); after creating the new page? because the API will create the page but it doesn't save to repository completely and because in next line you are trying to create another node underneath that (do the same for this too). Try it and let us know.