Re: AppController not registering Helpers
Well, yeah, we got it sorted (see above). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
modfather wrote: > sorry - app_controller.php is in app/controllers/app_controller.php Shouldn't this be in the main app directory? Mine is, anyway. -Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
glad you got it. modfather wrote: > thanks for your efforts - yeah something simple - i am sure its > something we all feel, ie you can't see the wood for the trees. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
thanks for your efforts - yeah something simple - i am sure its something we all feel, ie you can't see the wood for the trees. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
Ah, it's always a simple thing ;) Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
your my hero naTe - you are right - i assumed that app_controller, went with all the other controllers - maybe it should be renamed app_global. Thanks again - i wasn't far from throwing my screen against the wall in frustration. cheers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
app_controller.php should be in the /app folder, not /app/controllers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
Thats what i mean i have tried various methods(altering the controller was to see if there was somethingh wrong with my helper class, but there is not) to get this to work and examples but it is not working, thats why it is frustrating, i will try the rossoft head helper and see if it works - at the momment i cannot see what i am doing wrong. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
look I have the head helper made by rossoft: That's functionning, nothing more, no core change. app_controller.php class AppController extends Controller { var $helpers = array('Javascript', 'Head'); } layout/default.thtml : http://www.w3.org/TR/html4/strict.dtd";> charset('UTF-8');?> css('default');?> print_registered();?> modfather wrote: > Olivier, thanks for your persistance, but you could have an empty > function with nothing returning, you still have the same result, the > fact is if it works by adding the helper to helper array in the > controller.php file, it should work by adding the helper to the helper > array in the appcontroller, but it doesn't, somehwere along the line > the class is not being registered - it might have something to do with > the flow of logic of the chain of execution of classes. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
Olivier, thanks for your persistance, but you could have an empty function with nothing returning, you still have the same result, the fact is if it works by adding the helper to helper array in the controller.php file, it should work by adding the helper to the helper array in the appcontroller, but it doesn't, somehwere along the line the class is not being registered - it might have something to do with the flow of logic of the chain of execution of classes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
try class LinkHelper extends Helper //tried also without extends { function makeEdit() { return "linkhelper"; } } ?> modfather wrote: just in case there was confusion between the name "link" i changed the helper name to RedHelper(red.php), changed the name of the function from makeEdit() to bye(), still the same result, no recognition when added to app_controller.php helpers array - when added to core controller.php, it works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
You are echoing a function that does an echo. It's wrong you should only echo in the layout file. try the "does not work" version and clean the controller.php modfather wrote: > sorry - app_controller.php is in app/controllers/app_controller.php > > 100rk are you saying i have to call a constuctor in a custom helper > class, which in turn call the parent constuctor? > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
just in case there was confusion between the name "link" i changed the helper name to RedHelper(red.php), changed the name of the function from makeEdit() to bye(), still the same result, no recognition when added to app_controller.php helpers array - when added to core controller.php, it works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
sorry - app_controller.php is in app/controllers/app_controller.php 100rk are you saying i have to call a constuctor in a custom helper class, which in turn call the parent constuctor? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
It doesn't show IF Your AppController is in proper directory with proper filename --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
Are You sure You did call parent methods in methods which are redefining methods of parent class? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
here it is; http://www.cakephp.org/pastes/show/3de92ddad17cf2e3693379f82b3c7d27 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AppController not registering Helpers
Can you post all your code using the cakebin ? 2 things : -Don't touch the core else nobody can help you.(Apart for playing/understanding it, but dev should be made with a vanillia version) -Its probably not a bug, i've also some code with a custom helper in my layout. olivvv modfather wrote: > I wanted to add a customer helper to my layout file. I would get the > Fatal error: Call to a member function on a non-object in etc, i > registered the helper in the app_controller file via $helpers = > array('link'); also tried $helpers = array('Link');- still got fatal > error.I then added the customer helper to core "controller.php"(line > 86) file, specifically var $helpers = array('Html','Link'); - now i can > access the custom helper in the layout - so i can only conclude that > helpers are not being registered/recognised in the AppController file. > I am using PHP Version 4.4.2 and cake version 1.0.1.2708. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
AppController not registering Helpers
I wanted to add a customer helper to my layout file. I would get the Fatal error: Call to a member function on a non-object in etc, i registered the helper in the app_controller file via $helpers = array('link'); also tried $helpers = array('Link');- still got fatal error.I then added the customer helper to core "controller.php"(line 86) file, specifically var $helpers = array('Html','Link'); - now i can access the custom helper in the layout - so i can only conclude that helpers are not being registered/recognised in the AppController file. I am using PHP Version 4.4.2 and cake version 1.0.1.2708. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---