Pagenation load - 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: Pagenation load (/showthread.php?tid=5256) |
Pagenation load - El Forum - 01-14-2008 [eluser]viv81ster[/eluser] I have a problem C:\Sites\home\codeigniter\www\system\application\controllers\admin\users.php on line 104 A PHP Error was encountered Severity: Notice Message: Undefined property: Users::$pagination Filename: admin/users.php Line Number: 104 FreakAuth_light 1.1 PHP Version 5.1.2 Apache 2.0 register_globals on magic_quotes_gpc Off if paste in Loader.php 816: print_r($CI->$classvar); [_error_suffix] => ) CI_Pagination Object ( [base_url] => [total_rows] => [per_page] => 10 [num_links] => 2 [cur_page] => 0 [first_link] => ‹ First [next_link] => > [prev_link] => < [last_link] => Last › [uri_segment] => 3 [full_tag_open] => [full_tag_close] => [first_tag_open] => [first_tag_close] => [last_tag_open] => [last_tag_close] => [cur_tag_open] => [cur_tag_close] => [next_tag_open] => [next_tag_close] => [prev_tag_open] => [prev_tag_close] => [num_tag_open] => [num_tag_close] => ) Pagenation load - El Forum - 01-14-2008 [eluser]CodyPChristian[/eluser] Could you please paste your controller & view that have to do with this please. Also this should be in "CodeIgniter Discussion". Good luck Pagenation load - El Forum - 01-14-2008 [eluser]viv81ster[/eluser] Code: function index() A PHP Error was encountered Severity: Notice Message: Undefined property: Users::$pagination Filename: admin/users.php Line Number: 154 Fatal error: Call to a member function create_links() on a non-object in C:\Sites\home\codeigniter\www\system\application\controllers\admin\users.php on line 154 -- $data['pagination_links'] = $this->pagination->create_links(); Pagenation load - El Forum - 01-14-2008 [eluser]CodyPChristian[/eluser] Honestly I can't see the issue, it all *looks* okay so far, however I've never used $this->load->library('pagination',$config); I always do this: $this->load->library('pagination'); $this->pagination->initialize($config); $this->pagination->create_links(); Other then that, I don't see what is causing the error, everything looks normal. Pagenation load - El Forum - 01-14-2008 [eluser]viv81ster[/eluser] replace $this->load->library('pagination'); $this->pagination->initialize($config); //$this->pagination->initialize($config); but nothing changing I think, problem in PHP settings. Pagenation load - El Forum - 01-14-2008 [eluser]CodyPChristian[/eluser] Okay, well try this, move all of the pagination stuff to one block instead of spacing it out all over the place. Structure it more like this: Sample Pagination (That works) Pagenation load - El Forum - 01-16-2008 [eluser]viv81ster[/eluser] don't work I create new controller <?php class test extends Controller { function index() { $this->load->library('pagination'); $config['base_url'] = 'http://www.your-site.com/index.php/test/page/'; $config['total_rows'] = '200'; $config['per_page'] = '20'; $this->pagination->initialize($config); echo $this->pagination->create_links(); } } but A PHP Error was encountered Severity: Notice Message: Undefined property: test::$pagination Filename: controllers/test.php Line Number: 12 $this->pagination->initialize($config); Pagenation load - El Forum - 01-16-2008 [eluser]tonanbarbarian[/eluser] you do not have a constructor in the controller (or at least in the code you have posted here) Code: <?php Pagenation load - El Forum - 01-16-2008 [eluser]viv81ster[/eluser] [quote author="tonanbarbarian" date="1200493637"]you do not have a constructor in the controller (or at least in the code you have posted here) Code: <?php this is don't impact on error |