2Dec/0621
Undefined variable: javascript in cakePHP with scriptaculous
This weekend I was trying to get scriptaculous work with cakephp. Unfortunately I did always end up with the same error:
[code]Undefined variable: Javascript[/code]
After a couple of hours searching I found the following things can cause this problem:
- You do not have the html, javascript and ajax helper defined in your own controller (eg. user_controller.php)[php]var $helpers = array('Html','Javascript','Ajax'); [/php]
- Your render action points to a view where no view file is existing for. ( so the view file HAS to be created![php]$this->render('the_method','ajax'); [/php]
Hope it helps somebody who is experiencing the same problem I had.