Re: [Templates] debugging

2015-12-11 Thread Dave Howorth
Lathan Bidwell wrote:
> Is this related to TT's strict?

I don't know, but I need to locate my problem to find out!

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] debugging

2015-12-11 Thread Dave Howorth
Hmm,

I've found a way to make that error go away.

The keyword-index index included another template called shared.tt and
it had a line that said:

IF help.id ;

If I comment out that line and relevant code around it, the error goes
away. But if I substitute

IF help.id.defined ;

I still get the error.

Any thoughts on why that doesn't fix the error too?

Cheers, Dave

Dave Howorth wrote:
> I'm sure I've forgotten something simple about how to debug templates.
> 
> I have DEBUG_ALL on and I'm seeing this message:
> 
> 
> keyword-index: Template undef error - id is undefined
> 
> 
> keyword-index.tt is a template but it doesn't have any variable or
> component of a variable called id
> 
> 
> Neither do I see how to connect the error messages with any of the debug
> output above it, which is a bunch of lines similar to the last pair:
> 
> 
> [Template::Context] filter(lower, [ ])
> [Template::Filters] fetch(lower, ,
> Template::Context=HASH(0xe614920))
> 
> 
> Any thoughts on how to identify my error gratefully received.

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] debugging

2015-12-11 Thread Lathan Bidwell
That's because the syntax for defined is more like:

IF help.defined('id');

See the full docs:
http://template-toolkit.org/docs/manual/VMethods.html#section_defined_exists

Lathan

Hmm,
>
> I've found a way to make that error go away.
>
> The keyword-index index included another template called shared.tt and
> it had a line that said:
>
> IF help.id ;
>
> If I comment out that line and relevant code around it, the error goes
> away. But if I substitute
>
> IF help.id.defined ;
>
> I still get the error.
>
> Any thoughts on why that doesn't fix the error too?

Cheers, Dave
>
> Dave Howorth wrote:
> > I'm sure I've forgotten something simple about how to debug templates.
> >
> > I have DEBUG_ALL on and I'm seeing this message:
> >
> >
> > keyword-index: Template undef error - id is undefined
> >
> >
> > keyword-index.tt is a template but it doesn't have any variable or
> > component of a variable called id
> >
> >
> > Neither do I see how to connect the error messages with any of the debug
> > output above it, which is a bunch of lines similar to the last pair:
> >
> >
> > [Template::Context] filter(lower, [ ])
> > [Template::Filters] fetch(lower, ,
> > Template::Context=HASH(0xe614920))
> >
> >
> > Any thoughts on how to identify my error gratefully received.
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] debugging

2015-12-10 Thread Lathan Bidwell
Is this related to TT's strict?

http://template-toolkit.org/docs/manual/Config.html#section_STRICT



*Lathan Bidwell*Web Programmer
Division of Integrated Marketing & Communication
Andrews University

269-471-6313
*office*www.andrews.edu

"Seek Knowledge.  Affirm Faith.  Change the World."


On Thu, Dec 10, 2015 at 12:07 PM, Dave Howorth 
wrote:

> I'm sure I've forgotten something simple about how to debug templates.
>
> I have DEBUG_ALL on and I'm seeing this message:
>
>
> keyword-index: Template undef error - id is undefined
>
>
> keyword-index.tt is a template but it doesn't have any variable or
> component of a variable called id
>
>
> Neither do I see how to connect the error messages with any of the debug
> output above it, which is a bunch of lines similar to the last pair:
>
>
> [Template::Context] filter(lower, [ ])
> [Template::Filters] fetch(lower, ,
> Template::Context=HASH(0xe614920))
>
>
> Any thoughts on how to identify my error gratefully received.
>
> Cheers, Dave
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
>
> --
> BEGIN-ANTISPAM-VOTING-LINKS
> --
>
> NOTE: This message was trained as non-spam.  If this is wrong,
> please correct the training as soon as possible.
>
> Teach CanIt if this mail (ID 09PPR83pJ) is spam:
> Spam:
> http://www.andrews.edu/spam/b.php?i=09PPR83pJ=1e3b50edf8e1=s
> Not spam:
> http://www.andrews.edu/spam/b.php?i=09PPR83pJ=1e3b50edf8e1=n
> Forget vote:
> http://www.andrews.edu/spam/b.php?i=09PPR83pJ=1e3b50edf8e1=f
> Fraud/Phish:
> http://www.andrews.edu/spam/b.php?i=09PPR83pJ=1e3b50edf8e1=p
> --
> END-ANTISPAM-VOTING-LINKS
>
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates