Part of the EllisLab Network
   
 
Problem with scaffold URLs
Posted: 27 January 2007 02:02 PM   [ Ignore ]  
Summer Student
Total Posts:  5
Joined  01-27-2007

Hi All,

I’m just learning code igniter so I apologise in advance if this is a stupid mistake on my part. I’m just going through the video tutorial, and I’m trying to use a scaffold. I have configured the system to use a scaffold for a users table. The problem I have is that when I click on the add records button, I get a 404, because part of the URL has been replicated.

Eg:  It is trying to access http://10.0.0.20/Index.php/hello/scaffolding/index.php/hello/scaffolding/add

Instead of :  http://10.0.0.20/Index.php/hello/scaffolding/add

Can anyone tell me why it’s doing this?

Many thanks.

Profile
 
 
Posted: 27 January 2007 02:55 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  15
Joined  01-27-2007

Yes, try using site_url(‘hello/scaffolding/add’) instead of just ‘hello/scaffolding/add’. I think this is the solution, but might be wrong…

 Signature 

My geeky fetishes @ http://stii.za.net

Profile
 
 
Posted: 27 January 2007 02:57 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  5
Joined  01-27-2007

I’m sorry I don’t get you.  What is site_url, - and why doesn’t it just work like it does in the video tutorial?

Profile
 
 
Posted: 27 January 2007 06:27 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  1
Joined  01-27-2007

First, sorry but this is not my fisrt language.

You should modify $config[‘base_url’]= “”; for $config[‘base_url’] = “http://10.0.0.20/”; into of /application/config/config.php file… and “eureka”, problem solved…

Try it, and tell me later.

Profile
 
 
Posted: 28 January 2007 04:45 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
RankRankRank
Total Posts:  915
Joined  07-10-2006
Stii - 27 January 2007 02:55 PM

Yes, try using site_url(‘hello/scaffolding/add’) instead of just ‘hello/scaffolding/add’. I think this is the solution, but might be wrong…

Yes, but he also needs to load the url helper as needed in his controllers or globally using his autoload.php configuration file.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64453 Total Logged-in Users: 23
Total Topics: 80957 Total Anonymous Users: 0
Total Replies: 435678 Total Guests: 174
Total Posts: 516635    
Members ( View Memberlist )