Edit Page Issue - 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: Edit Page Issue (/showthread.php?tid=40776) |
Edit Page Issue - El Forum - 04-18-2011 [eluser]jzmwebdevelopement[/eluser] Hello, I am getting the following error when I try and access: domain.co.nz/admin/editpage/home I get the following error: Code: PHP Fatal error: Call to a member function getCMSPage() on a non-object in controllers/home.php on line 22 The issue with this is that I cannot understand why it is being passed back into the main "home" controller - which is the main controller Ideal Situation What I am trying to do with this is load the content into a text area on for editing and when submit is clicked I would like it to go back to the same page with a message saying content updated. Admin Template Code: <li><?php echo anchor('#','Edit Pages');?> Page Model Code: function updatePage($data){ View: Code: <?php Controller: Code: function index(){ Edit Page Issue - El Forum - 04-18-2011 [eluser]toopay[/eluser] load the model first! Code: $this->load->model('navigation_model'); Edit Page Issue - El Forum - 04-18-2011 [eluser]jzmwebdevelopement[/eluser] [quote author="toopay" date="1303194919"]load the model first! Code: $this->load->model('navigation_model'); It is already auto loaded http://cl.ly/2U1F3a2B0s2K0i3k3g13 Edit Page Issue - El Forum - 04-18-2011 [eluser]toopay[/eluser] Post your models here! Edit Page Issue - El Forum - 04-18-2011 [eluser]jzmwebdevelopement[/eluser] Here is my navigation_model: It works fine on other pages just not this one. Code: class Navigation_model extends CI_Model { Edit Page Issue - El Forum - 04-18-2011 [eluser]toopay[/eluser] and your controller... Edit Page Issue - El Forum - 04-18-2011 [eluser]jzmwebdevelopement[/eluser] Navigation Controller Code: class Navigation extends CI_Controller { Edit Page Issue - El Forum - 04-18-2011 [eluser]toopay[/eluser] just to make sure, lets disable autoload, and load the model manually right before you call it's function. Edit Page Issue - El Forum - 04-18-2011 [eluser]jzmwebdevelopement[/eluser] Still no luck Edit Page Issue - El Forum - 04-18-2011 [eluser]toopay[/eluser] [quote author="jzmwebdevelopement" date="1303191727"] I get the following error: Code: PHP Fatal error: Call to a member function getCMSPage() on a non-object in controllers/home.php on line 22 i've just noticed, the error is in your home controller! Post it here. |