⚠ 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

Fatal error: Cannot access empty property in C:\...\application\libraries\grocery_crud.php on line 1441



alex
  • profile picture
  • Member

Posted 27 December 2012 - 15:44 PM

Hi

I've just installed CI 213 under XAMPP and it works fine
Then I've downloade & copied G-CRUD under the main root (overwriting /application and creating /assets).
Next I just wanted to render a table of my dbase following this tutorial :
http://www.grocerycrud.com/documentation/create-crud-codeigniter-tutorial

in my controller I've added these lines :

function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');

}

function index () {


$this->grocery_crud->set_table('customer'); // existing in dbase
$output = $this->grocery_crud->render(); // existing under /application/libraries

}


XAMPP : 1.8.1
PHP : 5.4.7

kindly, any clue ?
thank you

tez
  • profile picture
  • Member

Posted 08 January 2013 - 06:26 AM

I had the same issue and solved it myself successfully.. Please let us know the database structure so that i can help you...

ceroberoz
  • profile picture
  • Member

Posted 29 July 2013 - 06:38 AM

trying to resurect the old topic because I had the same problem :D

Fatal error: Cannot access empty property in E:\xampp\htdocs\pluto\application\libraries\grocery_crud.php on line 1441

the controller

function saldoawal()
	{
		$crud = new grocery_CRUD();
		$crud->set_table('saldoawal')
			 ->set_relation('kodeakun','dataakun','tipeAkun');

		$output = $crud->render();
		$this->kekgwpeduliaja($output);
	}

the relations

1760449-NYRXV0R.png

*fix'd typo on relation table


davidoster
  • profile picture
  • Member

Posted 29 July 2013 - 09:11 AM

Hello and welcome to the forums [member=alex].

There is a known issue of having Grocery CRUD under index controller function. Please move it elsewhere and see if this fixes the issue. Please let us know about the results.


ceroberoz
  • profile picture
  • Member

Posted 21 August 2013 - 23:53 PM

for the god sake!

the table must have a primary key in order to solve this error :D