Scripting API Nested scripts are not allowed Error

Hello xwiki Team,

I wanted to use some scripts in the xwiki, but I have some trouble understanding scripting in xwiki.
What I did to use a script was to create a new Page, click the plus sign in the WYSIWYG Editor and than select ‘other Macros’ and velocity. After this I pasted in a script from the examples Page.
But than I got an Error saying : “Nested scripts are not allowed.”

I don’t really know what a Nested scipts are.
What is the right way to use and start scripts in the xwiki?
Is there an extension that I need?

1 Like

A nested script is a script used inside another script. For example the velocity macro used inside another velocity macro or inside a groovy macro or…

1 Like

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/

@aatr I only know about Nested scipts. Because i work so many months on it. Nested script are those scips who are made for inside scipts. :slightly_smiling_face:

Thanks for your help, It was a stupid mistake from me I added the script tags inside the add script popup of the WYSIWYG editor. The editor generates the script tages on his own so I ended up having a nested script.
So thanks again