Welcome Guest, Not a member yet? Register   Sign In
Scaffolding does not work in "subfoldered" controller
#1

[eluser]Pierce[/eluser]
It would seem that the scaffolding system does not work when placed in a controller that resides in a subfolder within /controllers/

The scaffolding activation code is in the file:

e.g. /controllers/folder/session.php

You'll simply get a 404 error.

If anyone knows of a possible fix or solution, I'd be interested in using it!

Thanks
#2

[eluser]Pascal Kriete[/eluser]
I'll be so bold and totally advertise my code... SparkPlug does what you want - at least one directory deep. I haven't had a chance to try it with libraries that give you more depth.
#3

[eluser]gunter[/eluser]
I thought this problem was solved in the current version 1.5.4??

Which version are you using??
#4

[eluser]Pierce[/eluser]
I'm using 1.5.4, the newest version available.
#5

[eluser]gunter[/eluser]
then I don´t know what happens... if the paths are correct in the config...
#6

[eluser]Pierce[/eluser]
Yepp, I've looked through the paths in the config, and consulted the topics on codeigniter.com that relate to improper index_page & base_path misconfiguration.

Has anyone been able to recreate this problem?2
#7

[eluser]zdknudsen[/eluser]
Yes, indeed a lot of people have been able to recreate said problem (a simple forum search would have confirmed this). It is caused by the scaffolding class using $this->uri->segment() for all its parameters and thereby causing problems when residing in subfolders. An official fix never made it into the source and now scaffolding is deprecated. Derek Allard's explanation was as follows:

Quote:This was a tough decision, and there was considerable internal debate, but at the end of the day we just weren’t happy with how scaffolding was implemented. We felt it didn’t live up to the quality of the rest of CodeIgniter, and until we can have something in there that does, we just didn’t want to ship with it. We were careful not to break any currently existing functionality, and scaffolding will stick around for some time, but the decision was made to move it out.

Your best move would probably be to either fix the current Scaffolding code yourself or use some of the alternatives presented by the community.
#8

[eluser]Pierce[/eluser]
Thanks for the explanation, it was much appreciated. I was really using it as a shortcut to some basic phpmyadmin functions.
#9

[eluser]zdknudsen[/eluser]
No problem. Just off the top of my head I know about CodeExtinguisher (http://codeextinguisher.com/) and Rapyd (http://www.rapyd.com/) as alternatives to CodeIgniters native Scaffolding.




Theme © iAndrew 2016 - Forum software by © MyBB