Thursday, October 8, 2009

Re: Cache View dose not work

i tired both
<?php echo $this->element('logininfo', array('cache' => false)); ?>
=> this dosen't work at all

in the element i tired <cake:nocache></cake:nocache> which i see no
debug error even though i set the debug 2
but when i see the view source page i get the errorr that i posted
above
thats wired problem that i cant figure out
thank you


On Oct 8, 9:29 am, Miles J <mileswjohn...@gmail.com> wrote:
> Try playing the nocache tags in the element itself. You can also pass
> an option to the element of cache = false.
>
> <?php echo $this->element('logininfo', array('cache' => false)); ?>
>
> On Oct 8, 9:26 am, Simon <simon_d...@hotmail.com> wrote:
>
>
>
> > haven't tried to remove the cache helper would  that make any
> > difference ?
>
> > sorry i just wrote the <cake:nocache> twice in this post  but the code
> > is like this see below in my layout
>
> > <cake:nocache>
> > <?php echo $this->element('logininfo'); ?>
> > </cake:nocache>
>
> > On Oct 8, 9:17 am, Miles J <mileswjohn...@gmail.com> wrote:
>
> > > Do you get an error when we remove the cache helper?
>
> > > Also the code should be:
>
> > > <cake:nocache>
> > > <?php echo $this->element('logininfo'); ?>
> > > </cake:nocache>
>
> > > On Oct 8, 7:44 am, Simon <simon_d...@hotmail.com> wrote:
>
> > > > well in that element it has the login user info which you dont wanna
> > > > cache
> > > > here is what i have in post controller
>
> > > >  var $helpers = array('Cache');
>
> > > > in my view  action i have this
>
> > > > $this->cacheAction = '1 hour';
>
> > > > then in my default layout i have this element which i put the
> > > > <cake:nocache>
> > > > <cake:nocache>
> > > > <?php echo $this->element('logininfo'); ?>
> > > > <cake:nocache>
> > > > then i get errorr which i can't see in the browser i did view source
>
> > > > this is the ouput of error
>
> > > > <pre class="cake-debug">
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeStackTrace1").style.display = (document.getElementById
> > > > ("CakeStackTrace1").style.display == "none" ? "" : "none")'><b>Notice</
> > > > b> (8)</a>: Undefined property: stdClass::$model [<b>CORE\cake\libs
> > > > \view\helper.php</b>, line <b>333</b>]
> > > > </pre>
> > > > <div id="CakeStackTrace1" class="cake-stack-trace" style="display:
> > > > none;"><a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorCode1").style.display = (document.getElementById
> > > > ("CakeErrorCode1").style.display == "none" ? "" : "none")'>Code</a> |
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorContext1").style.display = (document.getElementById
> > > > ("CakeErrorContext1").style.display == "none" ? "" : "none")'>Context</
> > > > a><pre id="CakeErrorContext1" class="cake-context" style="display:
> > > > none;">$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false</pre><div id="CakeErrorCode1"
> > > > class="cake-code-dump" style="display: none;"><pre><code><span
> > > > style="color:
> > > > #000000">        }</span></
> > > > code>
> > > > <code><span style="color: #000000"></span></code>
> > > > <span class="code-highlight"><code><span style="color:
> > > > #000000">        
> > > > $model = $view->model;</span></code></span>
> > > > </pre></div><pre>Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 333
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > 121
> > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > [main] - APP\webroot\index.php, line 90</pre></div>
> > > > <pre class="cake-debug">
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeStackTrace2").style.display = (document.getElementById
> > > > ("CakeStackTrace2").style.display == "none" ? "" : "none")'><b>Notice</
> > > > b> (8)</a>: Undefined property: stdClass::$association [<b>CORE\cake
> > > > \libs\view\helper.php</b>, line <b>366</b>]
> > > > </pre>
> > > > <div id="CakeStackTrace2" class="cake-stack-trace" style="display:
> > > > none;"><a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorCode2").style.display = (document.getElementById
> > > > ("CakeErrorCode2").style.display == "none" ? "" : "none")'>Code</a> |
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorContext2").style.display = (document.getElementById
> > > > ("CakeErrorContext2").style.display == "none" ? "" : "none")'>Context</
> > > > a><pre id="CakeErrorContext2" class="cake-context" style="display:
> > > > none;">$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false
> > > > $model  =       null
> > > > $hasField       =       false
> > > > $sameScope      =       true
> > > > $parts  =       array(
> > > >         "User"
> > > > )</pre><div id="CakeErrorCode2" class="cake-code-dump" style="display:
> > > > none;"><pre><code><span style="color:
> > > > #000000">        }</span></
> > > > code>
> > > > <code><span style="color: #000000"></span></code>
> > > > <span class="code-highlight"><code><span style="color:
> > > > #000000">        if (!
> > > > $view->association && $parts[0] == 
> > > > $view->field && $view->field != 
> > > > $view->model) {</span></code></span>
> > > > </pre></div><pre>Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 366
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > 121
> > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > [main] - APP\webroot\index.php, line 90</pre></div>
> > > > <pre class="cake-debug">
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeStackTrace3").style.display = (document.getElementById
> > > > ("CakeStackTrace3").style.display == "none" ? "" : "none")'><b>Notice</
> > > > b> (8)</a>: Undefined property: stdClass::$field [<b>CORE\cake\libs
> > > > \view\helper.php</b>, line <b>366</b>]
> > > > </pre>
> > > > <div id="CakeStackTrace3" class="cake-stack-trace" style="display:
> > > > none;"><a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorCode3").style.display = (document.getElementById
> > > > ("CakeErrorCode3").style.display == "none" ? "" : "none")'>Code</a> |
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorContext3").style.display = (document.getElementById
> > > > ("CakeErrorContext3").style.display == "none" ? "" : "none")'>Context</
> > > > a><pre id="CakeErrorContext3" class="cake-context" style="display:
> > > > none;">$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false
> > > > $model  =       null
> > > > $hasField       =       false
> > > > $sameScope      =       true
> > > > $parts  =       array(
> > > >         "User"
> > > > )</pre><div id="CakeErrorCode3" class="cake-code-dump" style="display:
> > > > none;"><pre><code><span style="color:
> > > > #000000">        }</span></
> > > > code>
> > > > <code><span style="color: #000000"></span></code>
> > > > <span class="code-highlight"><code><span style="color:
> > > > #000000">        if (!
> > > > $view->association && $parts[0] == 
> > > > $view->field && $view->field != 
> > > > $view->model) {</span></code></span>
> > > > </pre></div><pre>Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 366
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > 121
> > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > [main] - APP\webroot\index.php, line 90</pre></div>
> > > > <pre class="cake-debug">
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeStackTrace4").style.display = (document.getElementById
> > > > ("CakeStackTrace4").style.display == "none" ? "" : "none")'><b>Notice</
> > > > b> (8)</a>: Trying to get property of non-object [<b>CORE\cake\libs
> > > > \view\helpers\form.php</b>, line <b>185</b>]
> > > > </pre>
> > > > <div id="CakeStackTrace4" class="cake-stack-trace" style="display:
> > > > none;"><a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorCode4").style.display = (document.getElementById
> > > > ("CakeErrorCode4").style.display == "none" ? "" : "none")'>Code</a> |
> > > > <a href='javascript:void(0);' onclick='document.getElementById
> > > > ("CakeErrorContext4").style.display = (document.getElementById
> > > > ("CakeErrorContext4").style.display == "none" ? "" : "none")'>Context</
> > > > a><pre id="CakeErrorContext4" class="cake-context" style="display:
> > > > none;">$model   =       "User"
> > > > $options        =       array(
> > > >         "type" => "post",
> > > >         "action" => "login",
> > > >         "url" => array(
> > > >         "controller" => "users"
> > > > ),
> > > >         "default" => true
> > > > )
> > > > $defaultModel   =       null
> > > > $view   =       false
> > > > $models =       array()
> > > > $append =      
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate