Powered by Invision Power Board



  Reply to this topicStart new topicStart Poll

> $auth doesn't exist
cocobrick
Posted: May 11 2011, 10:33 AM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 2822
Joined: 10-May 11



Hi,

I've made the framework upgrade 0.2.9 -> 1.3.8 and have problem with helper auth and asset. I suppose helpers were written by website's programmers. I have AppControlller with code:
PHP Code
<?php
var $components = array(
        
'RequestHandler',
        
'Security',
        
'Auth',
        
'XAjax',
        
//'DebugKit.Toolbar',
        
'Cookie'
    
);
    var 
$helpers = array(
        
'Html',
        
'Javascript',
        
'AutoLoadPageSpecific',
        
'Form',
        
'Auth',
        
'Asset',
        
        
'Time',
        
'Tree',
        
'List',
        
'Text'
    
);
?>
And in template:
CODE
echo $asset->scripts_for_layout();
///
<?php
                   if($auth->sessionValid())
//


Unfortunately I get errors like:
Notice (8): Undefined variable: asset [APP\views\layouts\default.ctp, line 35]
or
Notice (8): Undefined variable: auth [APP\views\layouts\default.ctp, line 50]

What's wrong with that?

cocobrick
PMEmail Poster
Top
cocobrick
Posted: May 11 2011, 11:24 AM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 2822
Joined: 10-May 11



If I use syntax: $this->Asset->... like on book, I get error: undefined property View::$Asset
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Disclaimer:
This forum is in no way affiliated with the Cake Software Foundation
The CakePHP name and icon is a trademark of the Cake Software Foundation


Lo-Fi Version