#type is optional for markup elements. If it's not specified in an element, subform causes drupal_render() to never call drupal_pre_render_markup(). Instead of the expected HTML, the element gets rendered as an empty string.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deviantintegral’s picture

ntsekov’s picture

Issue summary: View changes
FileSize
985 bytes

I wrote patch for 7.x-1.0-alpha2 version.

jensschuppe’s picture

Status: Needs review » Needs work

This should take into account all element types that define default #pre_render callbacks and not just markup. See https://www.drupal.org/node/914792#comment-3540480 for how this should be done:

$element['#pre_render'] = array_merge(array('subform_form_child_pre_render' => 'subform_form_child_pre_render'), element_info_property('markup', '#pre_render', array()));