Title: Error message
Last modified: April 25, 2019

---

# Error message

 *  Resolved [hkakinuma](https://wordpress.org/support/users/hkakinuma/)
 * (@hkakinuma)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/)
 * I used Custom Post Type UI for a while and could create some custom post type
   in this site too. However, when I try to add new custom post type, I encounter
   following error message. Is there any way to fix this problem?
 * supplied for foreach() in …/public/wp-content/plugins/custom-post-type-ui/custom-
   post-type-ui.php on line 352
 * Warning: Cannot modify header information – headers already sent by (output started
   at …/public/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php:352)
   in …/public/wp-admin/includes/misc.php on line 1198
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-message-755%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11466594)
 * Have you provided labels at all? Asking because the line 352 spot is when we 
   iterate over saved label values for the actual registration of the chosen post
   type.
 * You should have had to provide at least 2 labels for the post type itself.
 * Also, just in case, what post type slug did you register?
 *  Thread Starter [hkakinuma](https://wordpress.org/support/users/hkakinuma/)
 * (@hkakinuma)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11468198)
 * Thank you for the quick reply.
 * I provided plural labels and singular labels for every post type.
    Also I registered
   article_car (and labels: Articles Car / Article Car).
 * Here is the debug info.
    [https://www.dropbox.com/s/hgkw3d1zewumwfb/30290425_debug.zip?dl=0](https://www.dropbox.com/s/hgkw3d1zewumwfb/30290425_debug.zip?dl=0)
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11471750)
 * Just as a dumb luck chance, and assuming you’re able to navigate anywhere still,
   can you go in and hit save again on the post types? I know there are 8, but not
   asking to do anything else besides just re-save them.
 * It’s a bit curious that something didn’t save at minimum an empty array for you.
 *  Thread Starter [hkakinuma](https://wordpress.org/support/users/hkakinuma/)
 * (@hkakinuma)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11474250)
 * Hello. As you suggested, I tried re-saved existing post types, and every time
   I clicked save button, same error message appeared.
    Thinking about some collapsed
   data, I deleted all existing post type and taxonomies (I have a backup of whole
   this site), then try to create a test post type. Error message appeared. Then,
   I deactivated and deleted this plug-in, reinstall latest version again, then 
   tried to create new test post type. Still it showed error message. I deleted 
   this newly created test post type, and got the debug info. Here is the link: 
   [https://www.dropbox.com/s/tkgdqruv7wzdzhy/20190427_debug.zip?dl=0](https://www.dropbox.com/s/tkgdqruv7wzdzhy/20190427_debug.zip?dl=0)
 * I wish you can have some solution.
 * Hiroyuki
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11474284)
 * You’re still getting the error even without anything saved for your CPTUI settings?
   or did they go away once you removed everything?
 * Beyond that, I don’t have any sort of readymade solution or hotfix available,
   since it should be saving at LEAST an empty array for the label spots, last I
   checked. I do strive to avoid warnings/notices whenever possible.
 *  Thread Starter [hkakinuma](https://wordpress.org/support/users/hkakinuma/)
 * (@hkakinuma)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11475844)
 * Yes, once I clear re-installed CPTUI, error message is disappeared. However, 
   when I tried to create new post type, it appeared again.
    Here is the message:
 * supplied for foreach() in …/public/wp-content/plugins/custom-post-type-ui/inc/
   post-types.php on line 1431
 * Warning: Invalid argument supplied for foreach() in …/public/wp-content/plugins/
   custom-post-type-ui/custom-post-type-ui.php on line 352
 * Warning: Cannot modify header information – headers already sent by (output started
   at …/public/wp-content/plugins/custom-post-type-ui/inc/post-types.php:1431) in…/
   public/wp-admin/includes/misc.php on line 1198
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11475899)
 * I am really unsure why you’re not getting all of the data that you should be,
   it’s quite honestly making me scratch my head.
 * Best guess I have at this point, at least with the latest errors shown, is somehow
   the $_POST global doesn’t somehow have all the data it should.
 * Here’s line 1431: [https://github.com/WebDevStudios/custom-post-type-ui/blob/master/inc/post-types.php#L1431](https://github.com/WebDevStudios/custom-post-type-ui/blob/master/inc/post-types.php#L1431)
 * It should at MINIMUM have an empty array based off of how I’ve long perceived
   form data being handled. I’m legitimately curious if there’s some plugin or piece
   of code in your site that is affecting the $_POST global before we can get to
   it.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error message’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

## Tags

 * [error message](https://wordpress.org/support/topic-tag/error-message/)

 * 7 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/error-message-755/#post-11475899)
 * Status: resolved