CodeIgniter Forums
Scaffolding Troubles - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Scaffolding Troubles (/showthread.php?tid=2037)



Scaffolding Troubles - El Forum - 07-12-2007

[eluser]webdezzo[/eluser]
Hey all,

I am new to CI, and trying to get this puppy working. All is well until I try setting up scaffolding. I have tried the .htaccess implementations, and still am having no luck. It appears that the edit / insert / view functionality is working properly, but I keep getting php notices. I have set directive :

AddHandler application/x-httpd-php5 .php

in my .htaccess file as my host requires, and still nothing.

http://www.undecisive.com/index.php/blog/scaffolding

Thanks in advance!


Scaffolding Troubles - El Forum - 07-12-2007

[eluser]Phil Sturgeon[/eluser]
Erm, Is blog a controller or a subdirectoy?

You cant have scaffolding in a subdirectory unless you implement the code-hack I wrote here


Scaffolding Troubles - El Forum - 07-12-2007

[eluser]webdezzo[/eluser]
Blog was a controller, I recently updated with the bare bones install to make sure I wasn't messing anything up. Here is the new url, same thing happening:

http://www.undecisive.com/welcome/scaffolding/

It's just the default welcome page, with a db setup and scaffolding on it. Everything seems to be working fine, its just throwing alot of php notices?


Scaffolding Troubles - El Forum - 07-13-2007

[eluser]Phil Sturgeon[/eluser]
If it is a controller then you shouldnt be using a method to call it. You are meant to put the scaffolding command into the controllers constructor as shown in the user guide.

Eg:

Code:
<?php
class Blog extends Controller {

       function Blog()
       {
            parent::Controller();

            $this->load->scaffolding('table_name');
       }
}
?>

Then call is as /blog/scaff_trig.

This is of course very annoying as it does limit your use of the scaffolding, but I preffer to just make one scaffolding file then change the table name around now and then.