You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "THOMAS, BRIAN M (SBCSI)" <bt...@att.com> on 2006/04/25 17:08:32 UTC

#include()ed doc not loading

I'm a little fuddled about a macro definition file.  The Velocity engine
is running in a Tomcat server (XWiki, actually) and I have a Velocity
macro defined in a wiki document which is included in another wiki
document which also calls it.

The problem is that after the wiki restarts, the macro definition file
is not loaded - or at least, the macro definition is not placed into the
context - as evidenced by Velocity rendering the call instead of its
execution.  Its argument is expanded, so that it's plain that it is
being rendered.  What usually fixes it is when one of us opens the file
explicitly, or saves it.

I'm not at all certain that this is a Velocity problem, but I'd like to
know if there's a way to learn whether an #include directive has failed,
other than to note that the macro is undefined...?

brain[sic] 

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: #include()ed doc not loading

Posted by Will Glass-Husain <wg...@forio.com>.
Hi Brian,

This is a known issue.  Macros can't be written in one file and
included with a #parse statement.  See this for a summary.
http://wiki.apache.org/jakarta-velocity/MacroIssues

WILL

On 4/25/06, THOMAS, BRIAN M (SBCSI) <bt...@att.com> wrote:
> I'm a little fuddled about a macro definition file.  The Velocity engine
> is running in a Tomcat server (XWiki, actually) and I have a Velocity
> macro defined in a wiki document which is included in another wiki
> document which also calls it.
>
> The problem is that after the wiki restarts, the macro definition file
> is not loaded - or at least, the macro definition is not placed into the
> context - as evidenced by Velocity rendering the call instead of its
> execution.  Its argument is expanded, so that it's plain that it is
> being rendered.  What usually fixes it is when one of us opens the file
> explicitly, or saves it.
>
> I'm not at all certain that this is a Velocity problem, but I'd like to
> know if there's a way to learn whether an #include directive has failed,
> other than to note that the macro is undefined...?
>
> brain[sic]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>


--
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org