hello,
since i updated to version 2.1.3 when i try to turn relationship field to normal text field i got an error :
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Rel_ft::$db
Filename: fieldtypes/ft.rel.php
Line Number: 202
Fatal error: Call to a member function select() on a non-object in ee system path/expressionengine/fieldtypes/ft.rel.php on line 202
actually i tried to fix the error by myself and i fixed it
i just replace the lines 202,203,204 in ft.rel.php file ,
from:
$this->db->select(‘field_id_’.$data[‘field_id’]);
$this->db->where(‘field_id_’.$data[‘field_id’].’ !=’, ‘0’);
$rquery = $this->db->get(‘channel_data’);
to:
$this->EE->db->select(‘field_id_’.$data[‘field_id’]);
$this->EE->db->where(‘field_id_’.$data[‘field_id’].’ !=’, ‘0’);
$rquery = $this->EE->db->get(‘channel_data’);
the error was php logic error (using db object without EE object because this object does not have db object but EE have db object.i just added EE before using db
that’s my fix and it worked well.
thanks,