diff --git a/fillpdf.module b/fillpdf.module index c1866378b302cd9e4ed2adf3996db50442c3b613..b38a16379324891787bb3686f7011f5c00401303 100644 --- a/fillpdf.module +++ b/fillpdf.module @@ -830,12 +830,14 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i // If no nid is given, and Entity API is disabled, use the default nid as a // classic node. (If Entity API is enabled, we'll handle it as an entity later // on in this function.) - if (!$entity_mode && !empty($fillpdf_info->default_nid) && empty($nids) && empty($webform_array)) { + if (empty($fillpdf_info->default_entity_type) && !empty($fillpdf_info->default_nid) && empty($nids) && empty($webform_array)) { $default_node = node_load($fillpdf_info->default_nid); if ($default_node) { // Default node is a non-webform node. if (empty($default_node->webform)) { - $context['nodes'][] = $default_node; + if (!$entity_mode) { + $context['nodes'][] = $default_node; + } } // Default node is a webform. else { @@ -845,6 +847,8 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i 'node' => $default_node, ), ); + // Since this is handled here, prevent it from being processed as an entity later. + $entity_mode = FALSE; } } }