[pLog-svn] r5445 - plog/branches/lifetype-1.2/class/template

Mark Wu markplace at gmail.com
Thu May 24 23:57:35 EDT 2007


I think it is because the smarty compiled-php cache.

Did you try clear all tmps and try it again?

If you do that, the cpmpiled-php will generate again without
_smarty_noncache()

Mark

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Friday, May 25, 2007 11:26 AM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r5445 - 
> plog/branches/lifetype-1.2/class/template
> 
> From the apache error log:
> 
> [Thu May 24 23:19:22 2007] [error] [client 151.201.50.248] PHP Fatal
> error:  Call to undefined function:  _smarty_nocache() in 
> /home/limedaley/www/tmp/1/%%C0^C00^C009E70D%%comments
> .html.template.inc on line 11, referer: http://limedaley.com/
> 
> 
> Here is the .inc file.  Line 11 is the line that starts with 
> "$this->_tag_stack" and ends with "?>"
> 
> 
> 
> <?php /* Smarty version 2.6.18, created on 2007-05-24 23:20:21
>           compiled from limedaley/comments.html.template */
> 
> $this->_cache_serials['./tmp/1/%%C0^C00^C009E70D%%comments.htm
> l.template.inc'] 
> = '234df6ca8fc36fc06803462b82850ad3';
> 
> ?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
> smarty_core_load_plugins(array('plugins' => array(array('block', 
> 'dynamic', 'limedaley/comments.html.template', 5, false),)), 
> $this); ?>
> <?php
> function _smarty_tplfunc_234df6ca8fc36fc06803462b82850ad3_0(&$this)
> {
> $this->_tag_stack[] = array('dynamic', array()); 
> $_block_repeat=true;_smarty_nocache($this->_tag_stack[count($t
> his->_tag_stack)-1][1], 
> null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
>    <?php
>      include("/home/limedaley/www/contact.php");
> 
>      if($mailSent == 0){
>        print "<form action='/static/comments.html' method='post'>\n" .
>            "Full Name:\n" .
>            "<input type='text' name='name' size='20'\n" .
>            "   value='".$name."' maxlength='20'><br />\n" .
>            "E-mail address:\n" .
> 
> 
> 
> On Thu, 24 May 2007, jondaley at devel.lifetype.net wrote:
> 
> > Author: jondaley
> > Date: 2007-05-24 23:22:01 -0400 (Thu, 24 May 2007)
> > New Revision: 5445
> >
> > Modified:
> >   plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php
> > Log:
> > reverted 5442, it causes a crash.  I didn't investigate, 
> but presumably when the template is cached can't find the 
> _smarty_nocache function - I had tested it before, and it 
> looked alright, so I am not sure why I suddenly got this 
> crash.  It was on a page that used a {dynamic} tag and a 
> {php} tag, if that has anything to do with it.
> >
> > Modified: 
> plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php
> > ===================================================================
> > --- 
> plog/branches/lifetype-1.2/class/template/cachedtemplate.cl
> ass.php	2007-05-24 18:16:31 UTC (rev 5444)
> > +++ 
> plog/branches/lifetype-1.2/class/template/cachedtemplate.cl
> ass.php	2007-05-25 03:22:01 UTC (rev 5445)
> > @@ -31,6 +31,11 @@
> >             $config =& Config::getConfig();
> >             $this->caching = $config->getValue( 
> "template_cache_enabled");
> >             $this->cache_lifetime =  $config->getValue( 
> "template_cache_lifetime" );
> > +            //$this->cache_dir    = $config->getValue( 
> "temp_folder" )
> > +
> > +			// whatever is between the 
> {dynamic}...{/dynamic} tags shouldn't be cached
> > +			$this->register_block('dynamic', 
> "_smarty_nocache", false);
> > +
> >         }
> >
> >         /**
> > @@ -96,4 +101,14 @@
> > 			return $timestamp;
> > 		}
> >     }
> > +
> > +
> > +	/**
> > +	 * @private
> > +	 * this tells smarty *not* to cache contents, in case we need it
> > +	 */
> > +	function _smarty_nocache($param, $content, $smarty )
> > +	{
> > +		return $content;
> > +	}
> > ?>
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
> 
> -- 
> Jon Daley
> http://jon.limedaley.com/
> 
> Never put off until tomorrow what you can put off indefinitely.
> -- unknown
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list