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 = ""
$id = false
$created = false
$data = array(
"fields" => array(),
"key" => "id",
"validates" => array()
)
$recordExists = false</pre><div id="CakeErrorCode4" class="cake-code-
dump" style="display: none;"><pre><code><span style="color:
#000000">
$actionDefaults = array(</span></code>
<code><span style="color:
#000000"> 'plugin' =>
$this->plugin,</span></code>
<span class="code-highlight"><code><span style="color:
#000000"> 'controller' =>
$view->viewPath,</span></code></span>
</pre></div><pre>FormHelper::create() - CORE\cake\libs\view\helpers
\form.php, line 185
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><br />
<b>Fatal error</b>: Call to a member function entity() on a non-
object in <b>C:\xampp\htdocs\cake\cake\libs\view\helper.php</b> on
line <b>321</b><br />
iew.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><br />
<b>Fatal error</b>: Call to a member function entity() on a non-
object in <b>C:\xampp\htdocs\cake\cake\libs\view\helper.php</b> on
line <b>321</b><br />
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---