Did anybody face with problems when you need to add a custom read field?
Now I getting next error
A PHP Error was encountered Severity: Notice Message: Undefined index: test Filename: libraries/Grocery_CRUD.php Line Number: 4368
Where "test" is a custom read field. Folow to the 4368 line in GC library we found next code
protected function get_read_fields() { if($this->read_fields_checked === false) { $field_types = $this->get_field_types(); if(!empty($this->read_fields)) { foreach($this->read_fields as $field_num => $field) { if(isset($this->display_as[$field])) $this->read_fields[$field_num] = (object)array('field_name' => $field, 'display_as' => $this->display_as[$field]); else line 4368 $this->read_fields[$field_num] = (object)array('field_name' => $field, 'display_as' => $field_types[$field]->display_as); } } else { and so on.....
Why this error throws - because $field_types array doesnt have "test" field so $field_types[$field] index doesnt exist!
Next look at the $this->get_field_types() function where we get field types line 41
There you can see that it handles $this->basic_model->get_field_types_basic_table() fields , $this->relation_n_n fields, $this->add_fields and $this->edit_fields but NOT READ fields!
So I wonder why dont just add here $this->read_fields that will resolve the above error!
Or I missing something?