Re: error in default.thtml

2007-01-25 Thread kabturek
Hi On Jan 25, 6:58 am, lukemack [EMAIL PROTECTED] wrote: thanks guys - i resolved it by adding the helpers in cake\app_controller.php. what would be the point of having this in the \app folder? does it override the default one? You shouldn't edit anything in the /cake folder - these are the

Re: error in default.thtml

2007-01-25 Thread Samuel DeVore
Actaully you don't need to copy the app_controller from core, just make a new one that has just this class AppController extends Controller { var $components = array('Acl','Output'); // components you want for all controllers var $helpers = array('html', 'ajax');

Re: error in default.thtml

2007-01-25 Thread lukemack
thanks again! On 25 Jan, 13:52, Samuel DeVore [EMAIL PROTECTED] wrote: Actaully you don't need to copy the app_controller from core, just make a new one that has just this class AppController extends Controller { var $components = array('Acl','Output'); // components you want

Re: error in default.thtml

2007-01-25 Thread nate
Okay, the most likely issue is that Cake is rendering an error page, and the error page is using the default layout, which uses JavascriptHelper. Cake, on the other hand, is probably using the base Controller class to render the error. Ergo, no $javascript. If you want to know the *real*

error in default.thtml

2007-01-24 Thread lukemack
Hi, I'm getting the following error from my default cake homepage: Notice: Undefined variable: javascript in /var/www/cake/libs/view/templates/layouts/default.thtml on line 32 Fatal error: Call to a member function link() on a non-object in

Re: error in default.thtml

2007-01-24 Thread dkarlson
Do you have the helper loaded? On Jan 24, 12:27 pm, lukemack [EMAIL PROTECTED] wrote: Hi, I'm getting the following error from my default cake homepage: Notice: Undefined variable: javascript in /var/www/cake/libs/view/templates/layouts/default.thtml on line 32 Fatal error: Call to a

Re: error in default.thtml

2007-01-24 Thread lukemack
i tried adding var $helpers = array('Html', 'Javascript', 'Ajax'); to all controllers - does it need to be somewhere else too? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: error in default.thtml

2007-01-24 Thread lukemack
I have tried adding var $helpers = array('Html', 'Javascript', 'Ajax'); to all controllers and this did not help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: error in default.thtml

2007-01-24 Thread dkarlson
That should do it. Maybe there's something else going on? Try putting pr($this-helpers); into your view. It should list Javascript if Cake is loading the helper. D On Jan 24, 12:45 pm, lukemack [EMAIL PROTECTED] wrote: i tried adding var $helpers = array('Html', 'Javascript', 'Ajax'); to

Re: error in default.thtml

2007-01-24 Thread djiize
do you call your own controller/action (/your_controller/your_action) or the Pages controller (/pages/your_page) ? in the second case, maybe you should add your helpers in /app/app_controller.php On 24 jan, 19:44, lukemack [EMAIL PROTECTED] wrote: I have tried adding var $helpers =

Re: error in default.thtml

2007-01-24 Thread Samuel DeVore
try creating an app_controller.php file at the app level and add it there, it might not be a part of the pages controller On 1/24/07, dkarlson [EMAIL PROTECTED] wrote: That should do it. Maybe there's something else going on? Try putting pr($this-helpers); into your view. It should list

Re: error in default.thtml

2007-01-24 Thread lukemack
thanks for the replies. the pr($this-helpers) only returns: Array ( [0] = Html ) on default.thtml but contains javascript and html if i place it in a view for another controller. i'm new to cake and am just using http://mysite/ to view the default page and http://mysite/tasks to view the

Re: error in default.thtml

2007-01-24 Thread dkarlson
Somewhere you're not loading in the Javascript helper. Try Sam's tip. Calling $var helpers in the controller loads the helper for that controller. Calling $var helpers in \app\app_controller.php will load the helpers for all controllers. D On Jan 24, 3:04 pm, lukemack [EMAIL PROTECTED] wrote:

Re: error in default.thtml

2007-01-24 Thread lukemack
thanks guys - i resolved it by adding the helpers in cake\app_controller.php. what would be the point of having this in the \app folder? does it override the default one? thanks, lukemack. On 25 Jan, 01:55, dkarlson [EMAIL PROTECTED] wrote: Somewhere you're not loading in the Javascript