When "Teaser/Summaries" is selected under option "What to Display in the Block" the summary/trimmed content is missing from the displayed teaser, other fields in the teaser show as expected. I am using display suite to create the two column layout for my teaser and context to conditionally place the featured content block on a page.

Screenshot 1 showing what the teaser looks like when displayed in a view:
screenshot 1

Screenshot 2 showing the same teaser displayed in a featured content block.
screenshot2

Comments

susannecoates created an issue. See original summary.

cytherion’s picture

Assigned: Unassigned » cytherion
cytherion’s picture

StatusFileSize
new197.26 KB

The issue seems to result from the call to drupal_render on line 2256 of featured_content.module which replaces the node->body structure with the rendered content.

$node = node_load($item->sid);
node_build_content($node, 'search_result');
$node->body = drupal_render($node->content);

thus the structure of $node->body (below)
screenshot3

has been replaced with a string containing the HTML of the rendered node.

Commenting out "$node->body = drupal_render($node->content);" allows the summary to show in the teaser.

cytherion’s picture

cytherion’s picture

Issue summary: View changes
cytherion’s picture

This patch incorporates the change I noted earlier in this issue. Namely, I commented-out
$node->body = drupal_render($node->content) that appears on line 2253. This solution works for my particular use case which includes using the module to create "Related Content" blocks containing teasers, linked titles or full content. However, more extensive testing is needed to determine if removing this line of code breaks other parts of the module or creates problems for other use cases..

cytherion’s picture

Sorry, trying again as previous patch file was empty - I'm a newb to patching with GIT.

cytherion’s picture

Status: Active » Needs review