Re: Apache Template content repeating in callstack
Lathan Bidwell <[email protected]> Wed, 14 Jan 2015 11:19:20 -0500
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAOqPvqgA5fgnEt3BVEht2JDaz7kUfib9AYW8VMRNr3EOVo4qNw@mail.gmail.com> |
--===============5378282101614010204== Content-Type: multipart/alternative; boundary=001a1134d67e129723050c9f1ad7 --001a1134d67e129723050c9f1ad7 Content-Type: text/plain; charset=UTF-8 Hello, I was able to figure out the problem. There was a custom module: Template::Plugin::Gallery that declared $self as a global variable. I have corrected that improper usage and my issue appears to have been solved. Thanks, Lathan On Tue, Jan 13, 2015 at 3:53 PM, Lathan Bidwell <[email protected]> wrote: > I am running into a wierd bug where the Template Toolkit variables are > dirtied from template files that are not being called in the same request. > When I check the callstack, I get this: > Callers: $VAR1 = [ > 'path/to/real/page', > 'path/to/wrapper/file', > 'navigation.tt <http://nav.tt/>', > 'input text', > 'templates/external/gallery_cycle.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery_cycle.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery_cycle.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery_cycle.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'input text', > 'templates/external/gallery.html', > 'templates/external/gallery.html', > 'nav.tt', # template that is calling Asset plugin > 'Template::Plugin::Asset.pm' # Plugin that i am getting the > callstack from > ]; > > This page's content and variables randomly show up on other pages. > > Any idea on where to start debugging? I get a bit lost when delving into > the Template Context object. > > We do have a TT cache setup in /tmp/tt/, and I'm curious as to whether > updating the real files could somehow interact with the TT cache to pull > these extra 'input text' into the call stack. > > This is happening once every several minutes on my production web servers, > so any help would be appreciated. > > Lathan Bidwell > --001a1134d67e129723050c9f1ad7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<div><br></div><div>I was able to figure out the pro= blem.</div><div><br></div><div>There was a custom module: Template::Plugin:= :Gallery that declared $self as a global variable. I have corrected that im= proper usage and my issue appears to have been solved.</div><div><br></div>= <div>Thanks,</div><div>Lathan</div><div><br><div class=3D"gmail_extra"><br>= <div class=3D"gmail_quote">On Tue, Jan 13, 2015 at 3:53 PM, Lathan Bidwell = <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blan= k">[email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_q= uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e= x"><div dir=3D"ltr">I am running into a wierd bug where the Template Toolki= t variables are dirtied from template files that are not being called in th= e same request. When I check the callstack, I get this:<div><span style=3D"= font-size:13px">Callers: $VAR1 =3D [</span><br style=3D"font-size:13px"><sp= an style=3D"font-size:13px">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'path/to= /real/page</span><span style=3D"font-size:13px">',</span><br style=3D"f= ont-size:13px"><span style=3D"font-size:13px">=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 'path/to/wrapper/file',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 '<a href=3D"http://nav.tt/" target=3D"_blank">navigation.tt</a>'= ;,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br></span><s= pan style=3D"font-size:13px">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templa= tes/external/gallery_</span><span style=3D"font-size:13px">cycle.html',= </span><br style=3D"font-size:13px"><div style=3D"font-size:13px"><div><div= ><div></div></div></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input = text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/ga= llery.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text'= ,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.htm= l',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.html',<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.html',<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 'templates/external/gallery.html',<br>=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 'templates/external/gallery.html',<br>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 'templates/external/gallery_cycle.html',<br>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 'templates/external/gallery.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;templates/external/gallery_cycle.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 'input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'te= mplates/external/gallery.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &= #39;input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/e= xternal/gallery_cycle.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= ;input text',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/exte= rnal/gallery.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input te= xt',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gall= ery.html',<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.html&= #39;,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.html',<br>= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'input text',<br>=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 'templates/external/gallery.html',<br></div></= div><span style=3D"font-size:13px">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '= templates/external/gallery.</span><span style=3D"font-size:13px">html',= </span><div style=3D"font-size:13px"><div><span style=3D"color:rgb(80,0,80)= ">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '</span><a href=3D"http://nav.tt/"= target=3D"_blank">nav.tt</a><span style=3D"color:rgb(80,0,80)">', # te= mplate that is calling Asset plugin</span><br></div></div><div style=3D"fon= t-size:13px"><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'Template::Plugin:= :Asset.pm' # Plugin that i am getting the callstack from<br>=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ];</div><div><br></div><div>This page's content and v= ariables randomly show up on other pages.<br></div><div><br></div><div>Any = idea on where to start debugging? I get a bit lost when delving into the Te= mplate Context object.</div><div><br></div><div>We do have a TT cache setup= in /tmp/tt/, and I'm curious as to whether updating the real files cou= ld somehow interact with the TT cache to pull these extra 'input text&#= 39; into the call stack.<br></div><div><br></div><div>This is happening onc= e every several minutes on my production web servers, so any help would be = appreciated.</div><span class=3D"HOEnZb"><font color=3D"#888888"><div><br><= /div><div>Lathan Bidwell</div></font></span></div></div></div> </blockquote></div><br></div></div></div> --001a1134d67e129723050c9f1ad7-- --===============5378282101614010204== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates --===============5378282101614010204==--