Title: [Plugin: More Types] error message after adding fields &#8211; undefined index
Last modified: August 20, 2016

---

# [Plugin: More Types] error message after adding fields – undefined index

 *  [mrhayduke](https://wordpress.org/support/users/mrhayduke/)
 * (@mrhayduke)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-more-types-error-message-after-adding-fields-undefined-index/)
 * I have added one field to a custom post type (the first field added using more-
   fields) and when I go to the post type I see this error message where the new
   field should appear:
 * Notice: Undefined index: fields in /home/yaddayadda/www/wp/wp-content/plugins/
   more-fields/more-fields-settings-object.php on line 289
 * Not sure what to make of it. Thanks.
 * [http://wordpress.org/extend/plugins/more-types/](http://wordpress.org/extend/plugins/more-types/)

Viewing 1 replies (of 1 total)

 *  [DanClarkePro](https://wordpress.org/support/users/danclarkepro/)
 * (@danclarkepro)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-more-types-error-message-after-adding-fields-undefined-index/#post-2380472)
 * As you can see from the error, it is caused in more_fields, not more_types (_although
   they are closely related_)
 * To fix it change, I would go into the referenced file in your post and change
   lines 287-289 from:
 *     ```
       do_action('mf_box_head', $box);
   
       foreach ((array) $box['fields'] as $field) {
       ```
   
 * to:
 *     ```
       do_action('mf_box_head', $box);
       if(!is_array($box['fields'])) { $box['fields'] = array(); }
       foreach ((array) $box['fields'] as $field) {
       ```
   
 * (_Add the extra line into the gap between them_)
 * Hope this helps,
 * -Dan.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: More Types] error message after adding fields – undefined index’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/more-types.svg)
 * [More Types](https://wordpress.org/plugins/more-types/)
 * [Support Threads](https://wordpress.org/support/plugin/more-types/)
 * [Active Topics](https://wordpress.org/support/plugin/more-types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/more-types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/more-types/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [DanClarkePro](https://wordpress.org/support/users/danclarkepro/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-more-types-error-message-after-adding-fields-undefined-index/#post-2380472)
 * Status: not resolved