Most basic scripting question: can't get a Velocity script to run

  1. I have admin privileges, which explicitly include programming and scripting:
    image
  2. I have created a new page with Xwiki syntax. Inside the editor, in source mode:
    image
  3. Click “save”, see this:
    image
  4. Edit, go back into source mode:
    image

Please help I am losing my mind here.

Hi @neilw!
Are you sure you’re writing the code in the source mode? It looks rather the opposite. The {{ are escaped when you switch to source mode and not from source mode. You can also edit the page in Wiki mode for coding.

Hope it helps,
Alex

Second image shows that I am in source mode (source button highlighted).

If I edit in Wiki mode:
image

Then save:
image

I should also mention that the person who created the wiki instance is able to run scripts with no problem.

Ok, it is because you keep some blank spaces between brackets and velocity, meaning that the velocity macro call is invalid. See in the following 2 examples how the syntax highlight helps you to detect wrong syntax.
image

Thank you, that did it. Whew. :slight_smile: