Instantly share code, notes, and snippets.
The reason for the error that @julian-weinert and @jeryj (and myself) are experiencing relates to the following: I'm on 4.3 and the related lines are Line 1117 and Line 1121 which reference the $_object variable.
The wp_ajax_add_menu_item() function runs certain checks for the data provided, all of which the plugin passes, but then sets $_object through a switch for the menu-item-type which doesn't account for anything other than "custom", "post_type", or "taxonomy". Meanwhile, this plugin generates this value as the CPT name (see the original under "The AJAX").
Sorry, something went wrong.
Also, as @julian-weinert mentioned, once added to the menu, the link type reads "Custom Link" due to a similar issue in which the off-book usage doesn't trigger anything and falls through to the default labeling.