Hi, I'm Dominik Schwind, friend of the internet. Here is /now.
Say hello to me on Twitter or maybe even subscribe to my weekly newsletter.

November 29, 2018

Fun fact: if you happen to create a custom post type and because you’ve done it a hundred times, you do it without consulting the documentation and you conveniently forget that their name absolutely can’t ever be longer than 20 characters, you’re in for a surprise. Because in the beginning everything seems to work well, up until you try to save a new post. wp_insert_post will just silently fail, with a WP_Error without any further information.
So basically there are two ways to make sure that doesn’t happen again: You either remember to pick a short name (which might mess with prefixing) or you just don’t use WordPress.