ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Cant Edit Field Type - Cant change to "Date" from "Relationship" - Fatal Error - Pleaes Help :)

March 16, 2012 4:48pm

Subscribe [1]
  • #1 / Mar 16, 2012 4:48pm

    msamuels

    2 posts

    Hi - I want to change the field type to “date” I had it like this before but wanted to try and see what the “relationship” type was and once I found that it was not what I wanted, I tried to switch it back to “date” and I got this 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 [path to my system folder]/expressionengine/fieldtypes/ft.rel.php on line 202

    I see on the forum that it is fixed by changing the following lines on System Folder > expressionengine > fieldtypes > ft.rel.php Look around line number 202 for the following.

    HOW DO YOU GET TO WHERE THIS CODE IS TO CHANGE IT? I’M NEW TO THIS.

    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


    ANY ASSISTANCE YOU COULD PROVIDE WOULD MAKE MY DAY.  THANK YOU FOR YOUR TIME.  😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases