⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

An error has occurred on insert - POST insert 404 Not Found



Kleenex

Kleenex
  • profile picture
  • Member

Posted 15 April 2016 - 16:09 PM

Hi all!

I installed GC on codeigniter 3.0.6. The URL of the app is like www.domain.com/appname. I removed index.php and set up base_url to '/appname/'.

I create a controller, let's call it "debug", in this controller i create a function "table" just to show a table form DB. The controller shows up correctly with the crud, reading valued from a db table.

Problems come up when I try to insert new data with the crud. I get a pop-up showing "An error has occurred on insert".

 

So I checked with firebug what happens after I click "Save" and I discover this:

So since the URL contains twice "appname", an 404 is generated and I think that this is responsible of the pop-up error

Can anyone help to discover what makes this wrong URL on POST insert?

 

The problem is the same with update action

 

thanks in advance


Kleenex

Kleenex
  • profile picture
  • Member

Posted 15 April 2016 - 17:42 PM

I fix the problem by setting correctly base_url on config.php:

 

$config['base_url'] = 'http://www.domain.com/appname/';

 

...hope that this help someone else  :D