title: Yii PHP- Property is not defined
body: <p>I'm managing a site built on the Yii Framework and very randomly started to get the following error. Not exactly sure how or why this started happening since the source hasn't been touch. </p>
  
  <p>Appreciate any help. Thanks! </p>
  
  <pre><code> CException
      Description
      Property "feature.mobile_hero_img" is not defined.
      Source File
      /data/www.zoomiezoom.com/yii/framework/db/ar/CActiveRecord.php(106)
      00094:      */
      00095:     public function __get($name)
      00096:     {
      00097:         if(isset($this-&gt;_attributes[$name]))
      00098:             return $this-&gt;_attributes[$name];
      00099:         else if(isset($this-&gt;getMetaData()-&gt;columns[$name]))
      00100:             return null;
      00101:         else if(isset($this-&gt;_related[$name]))
      00102:             return $this-&gt;_related[$name];
      00103:         else if(isset($this-&gt;getMetaData()-&gt;relations[$name]))
      00104:             return $this-&gt;getRelated($name);
      00105:         else
      00106:             return parent::__get($name);
      00107:     }
      00108: 
      00109:     /**
      00110:      * PHP setter magic method.
      00111:      * This method is overridden so that AR attributes can be accessed like properties.
      00112:      * @param string property name
      00113:      * @param mixed property value
      00114:      */
      00115:     public function __set($name,$value)
      00116:     {
      00117:         if($this-&gt;setAttribute($name,$value)===false)
      00118:         {
      Stack Trace
      #0 /data/www.zoomiezoom.com/yii/framework/db/ar/CActiveRecord.php(106): CComponent-&gt;__get('mobile_hero_img')
      #1 /data/www.zoomiezoom.com/yii/framework/web/helpers/CHtml.php(1624): CActiveRecord-&gt;__get('mobile_hero_img')
      #2 /data/www.zoomiezoom.com/yii/framework/web/helpers/CHtml.php(1100): CHtml::activeInputField('text', Object(feature), 'mobile_hero_img', Array)
      #3 /data/www.zoomiezoom.com/protected/views/feature/_form.php(74): CHtml::activeTextField(Object(feature), 'mobile_hero_img', Array)
      #4 /data/www.zoomiezoom.com/yii/framework/web/CBaseController.php(119): require('/data/www.theax...')
      #5 /data/www.zoomiezoom.com/yii/framework/web/CBaseController.php(88): CBaseController-&gt;renderInternal('/data/www.theax...', Array, true)
      #6 /data/www.zoomiezoom.com/yii/framework/web/CController.php(732): CBaseController-&gt;renderFile('/data/www.theax...', Array, true)
      #7 /data/www.zoomiezoom.com/protected/views/feature/create.php(14): CController-&gt;renderPartial('_form', Array)
      #8 /data/www.zoomiezoom.com/yii/framework/web/CBaseController.php(119): require('/data/www.theax...')
      #9 /data/www.zoomiezoom.com/yii/framework/web/CBaseController.php(88): CBaseController-&gt;renderInternal('/data/www.theax...', Array, true)
      #10 /data/www.zoomiezoom.com/yii/framework/web/CController.php(732): CBaseController-&gt;renderFile('/data/www.theax...', Array, true)
      #11 /data/www.zoomiezoom.com/yii/framework/web/CController.php(671): CController-&gt;renderPartial('create', Array, true)
      #12 /data/www.zoomiezoom.com/protected/controllers/FeatureController.php(71): CController-&gt;render('create', Array)
      #13 /data/www.zoomiezoom.com/yii/framework/web/actions/CInlineAction.php(32): FeatureController-&gt;actionCreate()
      #14 /data/www.zoomiezoom.com/yii/framework/web/CController.php(300): CInlineAction-&gt;run()
      #15 /data/www.zoomiezoom.com/yii/framework/web/filters/CFilterChain.php(129): CController-&gt;runAction(Object(CInlineAction))
      #16 /data/www.zoomiezoom.com/yii/framework/web/filters/CFilter.php(41): CFilterChain-&gt;run()
      #17 /data/www.zoomiezoom.com/yii/framework/web/CController.php(983): CFilter-&gt;filter(Object(CFilterChain))
      #18 /data/www.zoomiezoom.com/yii/framework/web/filters/CInlineFilter.php(59): CController-&gt;filterAccessControl(Object(CFilterChain))
      #19 /data/www.zoomiezoom.com/yii/framework/web/filters/CFilterChain.php(126): CInlineFilter-&gt;filter(Object(CFilterChain))
      #20 /data/www.zoomiezoom.com/yii/framework/web/CController.php(283): CFilterChain-&gt;run()
      #21 /data/www.zoomiezoom.com/yii/framework/web/CController.php(257): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
      #22 /data/www.zoomiezoom.com/yii/framework/web/CWebApplication.php(320): CController-&gt;run('create')
      #23 /data/www.zoomiezoom.com/yii/framework/web/CWebApplication.php(120): CWebApplication-&gt;runController('feature/create')
      #24 /data/www.zoomiezoom.com/yii/framework/base/CApplication.php(135): CWebApplication-&gt;processRequest()
      #25 /data/www.zoomiezoom.com/public_html/admin_tae/index.php(13): CApplication-&gt;run()
      #26 {main}
  </code></pre>
  
  <p>schema for feature.php</p>
  
  <pre><code>&lt;?php
  
  class feature extends CActiveRecord
  {
      /**
       * The followings are the available columns in table 'feature':
       * @var integer $id
       * @var integer $feature_name_id
       * @var string $display_name
       * @var integer $language_id
       * @var string $long_blurb
       * @var string $short_blurb
       * @var string $subhead_text
       * @var string $hero_img
       * @var string $mobile_hero_img
       * @var string $thumb_sm
       * @var string $thumb_md
       * @var string $thumb_lg
       * @var string $link_url
       * @var string $link_image
       * @var string $link_text
       * @var string $buyit_id
       * @var string $seo_text
       * @var string $meta_description
       * @var string $meta_keywords
       * @var integer $category_id
       * @var integer $sub_cat_id
       * @var string $deep_link
       * @var string $tracking_id
       * @var integer $weight
       * @var integer $initial_rating
       * @var string $active
       * @var string $created
       * @var string $modified
       */
  
      /**
       * Returns the static model of the specified AR class.
       * @return CActiveRecord the static model class
       */
      public static function model($className=__CLASS__)
      {
          return parent::model($className);
      }
  
      /**
       * @return string the associated database table name
       */
      public function tableName()
      {
          return 'feature';
      }
  
      /**
       * @return array validation rules for model attributes.
       */
      public function rules()
      {
          // NOTE: you should only define rules for those attributes that
          // will receive user inputs.
          return array(
              array('feature_name_id', 'required'),
              array('feature_name_id, language_id, category_id, sub_cat_id, weight, initial_rating', 'numerical', 'integerOnly'=&gt;true),
              array('active', 'length', 'max'=&gt;1),
              array('display_name, long_blurb, short_blurb, subhead_text, page_title, hero_img, mobile_hero_img, thumb_sm, thumb_md, thumb_lg, link_url, link_image, link_text, buyit_id, seo_text, meta_description, meta_keywords, deep_link, tracking_id, created', 'safe'),
          );
      }
  
      /**
       * @return array relational rules.
       */
      public function relations()
      {
          // NOTE: you may need to adjust the relation name and the related
          // class name for the relations automatically generated below.
          // 'VarName'=&gt;array('RelationType', 'ClassName', 'ForeignKey', ...additional options)
          return array(
              'feature_name' =&gt; array(self::BELONGS_TO, 'feature_name', 'feature_name_id', 'alias'=&gt;'feature_name'),
              'language' =&gt; array(self::BELONGS_TO, 'language', 'language_id', 'on'=&gt;'t.language_id = language.id', 'alias'=&gt;'language'),
              'category' =&gt; array(self::BELONGS_TO, 'category', 'category_id', 'alias'=&gt;'category'),
              'sub_cat' =&gt; array(self::BELONGS_TO, 'sub_cat', 'sub_cat_id'),
              'language_r' =&gt; array(self::BELONGS_TO, 'language', 'language_id', 'alias'=&gt;'language'),
          );
      }
      /**
       * @return array Named Scopes.
       */
      public function scopes()
      {
          return array(
              'active'=&gt;array(
                  'condition' =&gt; 't.active="y"',
                  'order' =&gt; 'feature_name.type_id DESC, category_id, sub_cat_id, t.weight ASC',
              ),
          );
  
      }
  
      /**
       * @return array customized attribute labels (name=&gt;label)
       */
      public function attributeLabels()
      {
          return array(
              'id' =&gt; 'Id',
              'feature_name_id' =&gt; 'Feature Name ID',
              'display_name' =&gt; 'Display Name',
              'language_id' =&gt; 'Language',
              'long_blurb' =&gt; 'Main Description',
              'short_blurb' =&gt; 'Short Blurb',
              'subhead_text' =&gt; 'Subhead Text',
              'page_title' =&gt; 'Browser Title',
              'hero_img' =&gt; 'Hero Img',
              'mobile_hero_img' =&gt; 'Mobile Hero Img',
              'thumb_sm' =&gt; 'Small Thumbnail',
              'thumb_md' =&gt; 'Medium Thumbnail ',
              'thumb_lg' =&gt; 'Large Thumbnail',
              'link_url' =&gt; 'CTA Link Url',
              'link_image' =&gt; 'CTA Link Image',
              'link_text' =&gt; ' CTA Link Text',
              'buyit_id' =&gt; ' BuyIt Link Product ID',
              'seo_text' =&gt; 'SEO Copy',
              'meta_description' =&gt; 'Meta Description',
              'meta_keywords' =&gt; 'Meta Keywords',
              'category_id' =&gt; 'Category',
              'sub_cat_id' =&gt; 'Sub Category',
              'deep_link' =&gt; 'Deep Link',
              'tracking_id' =&gt; 'Tracking ID',
              'weight' =&gt; 'Weight',
              'initial_rating' =&gt; 'Initial Rating',
              'active' =&gt; 'Active',
              'created' =&gt; 'Created Date',
              'modified' =&gt; 'Modified Date',
          );
      }
  }
  </code></pre>