If a content type is deleted, and then a node of that type is viewed, the following errors are emitted:
Notice: Undefined index: comment_node_article_form in drupal_retrieve_form() (line 738 of /Users/simonroberts/htdocs/drupal7/includes/form.inc).
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'comment_node_article_form' was given in drupal_retrieve_form() (line 773 of /Users/simonroberts/htdocs/drupal7/includes/form.inc).
This is because comment_node_view() attempts to add the comment form using comment_node_{$node->type}_form even when the type is deleted, and so the form is not available.
Comments
Comment #1
lyricnz commentedHmm... This is the thin end of the wedge - how rigorous should we be about supporting content, where the underlying content-type is deleted? Here's a patch that squashes this particular issue, but I can't help but feel it might be a no-win battle. For example, you can't edit an item of a deleted content-type:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'product_node_form' was given in drupal_retrieve_form()
Comment #2
dixon_I haven't figured out what I think about this. No matter what we decide, it should apply to 8.x first to prevent any regression.
Comment #3
andypostPlease open if there's a way to reproduce