Hi I got over that. It is not pretty and I don't know what went wrong but I finally could find a good compromise. What I did was to use a Velocity script that then parsed and loaded a Groovy class which contained the code for the Blog Post Template. This way there was not check and it so I could pass this issue. That said I wasted some hours casing the issue where no entry object could be found until it dawned on me that the Blog Post Template not only contains the Wiki code but also and instance of the Blog Post Class, silly me. I am still working on getting the last kinks out but I think I mastered the most difficult issues. Soon I have to decide if I want to create a two prong Blog application or if I create a second Blog application (GBlog) that contains the Groovy code. Most likely the point that decides on which way to go is the fact if I can keep the Blog documents already written. Cheers - Andy On Sep 6, 2009, at 7:33 PM, Andreas Schaefer wrote:
Hi Guillaume
On Aug 31, 2009, at 12:28 AM, Guillaume Lerouge wrote:
scripted part of the Blog over to Groovy and keep the rest in the Blog Plugin. I don't have any experience with Groovy inside XWiki but for sure the documentation of Groovy outside is excellent compared to Velocity. I will use the next week to get up to speed and try to convert a piece of the Blog over to Groovy.
Then go ahead and give it a go :-)
One thing you need to be aware of when using Groovy inside the wiki is that your pages will haveto be saved using programming rights. This can cause a number of issues, don't forget to code with an user that has them, it will save yo ua lot of hassle ;-)
I encounter this issue when I tried to create a new blog entry within a Groovy script. That wouldn't be such a problem if I could understand what is going on but I don't. First I don't know when the programming rights are checked and second even if I have programming rights (as user Admin) I still cannot pass that check.
The Create Post which calls the inline blog edtior (see CreatePost when a name is given) falls even though no page is created yet. For now it seems I cannot only create a new post when both the CreatePost page as well as the BlogPostTemplate is written in velocity.
BTW I use 2.0m4 as the code base.
Cheers - Andy