Creating macro with parameter - Unknown macro: /velocity

Hello,

I’m trying to create a macro following this guide. The problem is it doesn’t render, instead it displays the Unknown macro: /velocity. message.

I checked on the extensions page and it says Velocity Macro 10.1 Version 9.11.3 is provided so I guess it’s installed.

What could be the problem?

Thanks

Hello,

Be certain to save your macro with account with programing rights (ie Admin account)
the macro author needs to have programming rights for a macro available in the whole farm

Pascal B

The slash in “Unknown macro: /velocity” is strange. It shouldn’t be there. When a macro “xyz” is not found the message is “Unknown macro: xyz”. Double check the code of your macro. It may have a syntax error.

@Pbas The problem is not of permissions since it says “unknown macro”. You don’t need have PR with use the velocity macro in general.

@johnnybaloney Please paste here the code you have so that we can help you more. Thx


It seem that I had this problem here to: a simple user did a simple content macro but it doesn’t work if admin user didn’t save it. Anyways I must check that again in my last xwiki version…

I checked on xwiki 9.11.2. A simple content macro working well with a user without PR.

All you need is the Script permission. However if you use privileged API you’ll need PR but in general you should try to not use those (and they’re dangerous - this is why they’re privileged ;)).