When creating my own macro, and trying to add it so that anyone can use it, I get the following error:

Error number 4001 in 4: Error while parsing velocity page /templates/docdoesnotexist.vm 

Wrapped Exception: Cannot start the Velocity engine

I do not change that file, but I do change xwiki/templates/macros.txt and /macros.vm by adding recentChanges=velocity:recentChanges: and #macro(recentChanges) respectively (yes, I do add working content after #macro(recentChanges))

有帮助吗?

解决方案

That looks like a syntax error in macros.vm. You should revert to the original macros.vm and first try to write your custom macro in a wiki page. Once it works, you can move it to macros.vm and restart the server.

macros.txt shouldn't be edited, it's a legacy file used by the older WYSIWYG editor.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top