Re: Undefined variable: javascript when Javascript is absolutely loaded
This problem just cropped up out of the blue for me. I made no changes to the AppController where the helpers are defined. I can't figure it out. The JavaScript file in question is clearly in the HTML, but everything is broken. I had made a simple change to a different controller that seemed to precipitate the error, but commenting out the function in question has no effect. Does anyone have any idea why this would seem to happen spontaneously? On Feb 4, 11:29 am, Stonk eric.rei...@gmail.com wrote: Maybe it will help someone in the future. Undefinedvariable:javascript[APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in xy\default.ctp on line Y If one helper can't be loaded (typo), no helper will be loaded. So if it says javascriptisundefined, it can be a typo anywhere in the $helpers var. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
I forgot to add that if I remove 'echo $javascript-link('js.js');' nothing is rendered at all. Even if I hand code the link to the JavaScript. It's truly bizarre and has broken my entire application. On Friday afternoon no less. :-( On Feb 27, 1:42 pm, Tony Thomas truet...@gmail.com wrote: This problem just cropped up out of the blue for me. I made no changes to the AppController where the helpers are defined. I can't figure it out. TheJavaScriptfile in question is clearly in the HTML, but everything is broken. I had made a simple change to a different controller that seemed to precipitate the error, but commenting out the function in question has no effect. Does anyone have any idea why this would seem to happen spontaneously? On Feb 4, 11:29 am, Stonk eric.rei...@gmail.com wrote: Maybe it will help someone in the future. Undefinedvariable:javascript[APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in xy\default.ctp on line Y If one helper can't be loaded (typo), no helper will be loaded. So if it says javascriptisundefined, it can be a typo anywhere in the $helpers var. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
On Fri, Feb 27, 2009 at 2:42 PM, Tony Thomas truet...@gmail.com wrote: This problem just cropped up out of the blue for me. I made no changes to the AppController where the helpers are defined. I can't figure it out. The JavaScript file in question is clearly in the HTML, but everything is broken. What's broken? You're seeing the non-object fatal error? But, if the javascript link is present (and the path is correct) are you just having JS issues? I had made a simple change to a different controller that seemed to precipitate the error, but commenting out the function in question has no effect. Does anyone have any idea why this would seem to happen spontaneously? Have you emptied your cache? --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
This must be something unrelated to CakePHP. My local version functions perfectly and now the production server doesn't give me the non-object fatal error, but doesn't include my JavaScript either. (BUT, at least the information is displayed, which is a start.) There's something bizarre happening with the server. On Feb 27, 1:51 pm, brian bally.z...@gmail.com wrote: On Fri, Feb 27, 2009 at 2:42 PM, Tony Thomas truet...@gmail.com wrote: This problem just cropped up out of the blue for me. I made no changes to the AppController where the helpers are defined. I can't figure it out. TheJavaScriptfile in question is clearly in the HTML, but everything is broken. What's broken? You're seeing the non-object fatal error? But, if thejavascriptlink is present (and the path is correct) are you just having JS issues? I had made a simple change to a different controller that seemed to precipitate the error, but commenting out the function in question has no effect. Does anyone have any idea why this would seem to happen spontaneously? Have you emptied your cache? --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
Maybe it will help someone in the future. Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in xy\default.ctp on line Y If one helper can't be loaded (typo), no helper will be loaded. So if it says javascript is undefined, it can be a typo anywhere in the $helpers var. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
The Javascript helper needs to be in your app_controller.php if you include any calls to the $javascript object. I got this error until I made that modification: class AppController extends Controller { // We use the Html and JavaScript helper across all of our controllers var $helpers = array('Html', 'Javascript'); On Nov 10, 2:03 am, Antoniov [EMAIL PROTECTED] wrote: Didn't i make it clear? There was an error says: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
Is your controller $helpers array defined in your AppController? Perhaps it is overwritten somewhere? On Nov 10, 11:03 am, Antoniov [EMAIL PROTECTED] wrote: Didn't i make it clear? There was an error says: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 On Nov 10, 12:27 am, Donkeybob [EMAIL PROTECTED] wrote: what happens when you link the the js file by using this method ?php echo $javascript-link('ext-2.0.1/ext-custom'); ? ? On Nov 9, 7:18 am,Antoniov[EMAIL PROTECTED] wrote: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 Controller code: var $components = array('RequestHandler','Security'); var $helpers = array('Form','Javascript','Html'); default.ctp line 8 ?php echo $javascript-link('/js/ext-2.0.1/ext-custom.js'); ? Anyone has any ideas? Thanks a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
I was just seeing if the same errors happened when you wrote the js path a little different. . . no need to get rude about it. thats how i like to troubleshoot. . . . . On Nov 10, 5:03 am, Antoniov [EMAIL PROTECTED] wrote: Didn't i make it clear? There was an error says: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 On Nov 10, 12:27 am, Donkeybob [EMAIL PROTECTED] wrote: what happens when you link the the js file by using this method ?php echo $javascript-link('ext-2.0.1/ext-custom'); ? ? On Nov 9, 7:18 am,Antoniov[EMAIL PROTECTED] wrote: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 Controller code: var $components = array('RequestHandler','Security'); var $helpers = array('Form','Javascript','Html'); default.ctp line 8 ?php echo $javascript-link('/js/ext-2.0.1/ext-custom.js'); ? Anyone has any ideas? Thanks a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
Didn't i make it clear? There was an error says: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 On Nov 10, 12:27 am, Donkeybob [EMAIL PROTECTED] wrote: what happens when you link the the js file by using this method ?php echo $javascript-link('ext-2.0.1/ext-custom'); ? ? On Nov 9, 7:18 am,Antoniov[EMAIL PROTECTED] wrote: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 Controller code: var $components = array('RequestHandler','Security'); var $helpers = array('Form','Javascript','Html'); default.ctp line 8 ?php echo $javascript-link('/js/ext-2.0.1/ext-custom.js'); ? Anyone has any ideas? Thanks a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Undefined variable: javascript when Javascript is absolutely loaded
what happens when you link the the js file by using this method ?php echo $javascript-link('ext-2.0.1/ext-custom'); ? ? On Nov 9, 7:18 am, Antoniov [EMAIL PROTECTED] wrote: Undefined variable: javascript [APP\views\layouts\default.ctp, line 8] Fatal error: Call to a member function link() on a non-object in D: \xampp\htdocs\cake\tree\views\layouts\default.ctp on line 8 Controller code: var $components = array('RequestHandler','Security'); var $helpers = array('Form','Javascript','Html'); default.ctp line 8 ?php echo $javascript-link('/js/ext-2.0.1/ext-custom.js'); ? Anyone has any ideas? Thanks a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---