help with scaffolding on the tutorial - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: help with scaffolding on the tutorial (/showthread.php?tid=1705) |
help with scaffolding on the tutorial - El Forum - 06-21-2007 [eluser]adrian westlake[/eluser] Hi, I am new to CI, and just ran through the third tutorial (the AJAX function search) and downloaded the code. I thought I\'d try the scaffolding functionality, so amended the routes.php file, and the application.php file. When the page loads up, there is a warning message at the top. Code: A PHP Error was encountered Anyone know the problem here? In the routes.php file i added the line: Code: $route[\'scaffolding_trigger\'] = \"g6sHjjUUSF7shbH\"; In the constructor of the application.php file I put: Code: $this->load->scaffolding(\'functions\'); and to access the scaffolding I typed the url localhost/ci_sample/application/g6sHjjUUSF7shbH I commented out the other code in the constuctor just in case that was interfering, but no luck... Any help most gratefully received, Adrian "help with scaffolding on the tutorial" - El Forum - 06-22-2007 [eluser]optimal[/eluser] Adrian, I checked out the error and found the code in the tutorial is out of synch with the current scaffolding implementation. The problem\'s in the version of url_helper included with the tutorial. The scaffolding views are calling its \"anchor\" function with an array as the first parameter, but the older version expected a string. The current implementation checks \"is_array\" for the $uri argument and can thus support an array argument (view anchor() in a current version of url_helper.php to confirm this). So you could possibly drop a newer version of url_helper into the helpers folder for the tutorial app to fix the problem, but I didn\'t try this to verify no further errors crop up. Good luck. BTW I\'m very impressed with this framework after evaluating so, so many others! |