Answers.Body: <p>That's interesting Luke, I had the exact same issue and spent WAY too long on it.</p>
  
  <p>Even though I used a diff tool to see the difference between working elementType models and the one with the error I just did not catch the silly difference:</p>
  
  <pre><code>protected function defineAttributes()
  {
      return array(
  </code></pre>
  
  <p>vs the working:</p>
  
  <pre><code>protected function defineAttributes()
  {
      return array_merge(parent::defineAttributes(), array(
  </code></pre>
  
  <p>you need to add the parent attributes that includes attributes like locale :)</p>
  
  <p>I knew that all along, but just didn't catch it on multiple re-reviewing of the Model.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-04T04:47:21.130Z
Answers.Text: lol - it's a good thing you were here to help answer the question.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-04T04:52:21.737Z
Answers.Text: I was the hero l needed, not the one I deserved.
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-04T07:26:34.957Z
Answers.Text: Luke, I heard Luke also had this issue.  Maybe you should ping him! =)
Answers.UserDisplayName: Ben Parizek
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-04T07:29:26.943Z
Answers.Text: thought this might be helpful @LukeHolder
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-04T04:23:14.937Z
Answers.LastActivityDate: 2015-02-04T04:23:14.937Z
Answers.UserDisplayName: Luke Holder
Body: <p>I have made numerous elementTypes in my plugin that all work perfectly but for some reason one elementType keeps having an error when trying to view the Model's content or custom fields.</p>
  
  <p>This is the error:</p>
  
  <p><code>Property "Craft\Myplugin_OrderModel.locale" is not defined.</code></p>
  
  <p>Everything looks exactly the same as all the other models that are elementTypes in my plugin.</p>
  
  <p>All my plugins elementType models are using </p>
  
  <pre><code>public function isLocalized()
  {
      return false;
  }
  </code></pre>
  
  <p>but the issue still persists with that one Model.</p>
  
Tags: <plugin-development><elementtype><baseelementmodel>
Title: Why does my custom element type error around locale being missing on the element types' model?
ThreadText: # Why does my custom element type error around locale being missing on the element types' model?
  
  (Asked by: username_0 on 2015-02-04)
  
  I have made numerous elementTypes in my plugin that all work perfectly but for some reason one elementType keeps having an error when trying to view the Model's content or custom fields.
  
  This is the error:
  
  `Property "Craft\Myplugin_OrderModel.locale" is not defined.`
  
  Everything looks exactly the same as all the other models that are elementTypes in my plugin.
  
  All my plugins elementType models are using
  
  ```
  public function isLocalized()
  {
      return false;
  }
  
  ```
  
  but the issue still persists with that one Model.
  
  **Tags:** plugin-development, elementtype, baseelementmodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-02-04. Score: 3
  
  That's interesting username_0, I had the exact same issue and spent WAY too long on it.
  
  Even though I used a diff tool to see the difference between working elementType models and the one with the error I just did not catch the silly difference:
  
  ```
  protected function defineAttributes()
  {
      return array(
  
  ```
  
  vs the working:
  
  ```
  protected function defineAttributes()
  {
      return array_merge(parent::defineAttributes(), array(
  
  ```
  
  you need to add the parent attributes that includes attributes like locale :)
  
  I knew that all along, but just didn't catch it on multiple re-reviewing of the Model.
  
  > **Comments:**
  > **username_1**: lol - it's a good thing you were here to help answer the question.  
  > **username_0**: I was the hero l needed, not the one I deserved.  
  > **username_2**: username_0, I heard username_0 also had this issue.  Maybe you should ping him! =)  
  > **username_0**: thought this might be helpful @username_0  
  
  ---
  
  