Have a new Drupal 7 install on a test site, and have found a problem with the Recipe module.

Even though I have set Structure > Content Types > Recipe > Manage Display to show the description in the teaser, it won't display.

http://csakitchen.com/

I get the image, the categories ... but no description.

Tried setting "additional notes" to display in the teaser, and it won't display either.

I'm stumped. Anybody have an idea how to fix this? Am using Acquia Marina theme for D7.

Thanks!

Comments

vadzen’s picture

I have the same issue.

taps7734’s picture

Same Issue here.

Subscribing to this thread to see a fix.

taps7734’s picture

Quick fix for this in current 7.x-1.x-dev.....

In recipe.module, I copied the code from lines 846-850

  // Begin filling the node->content array with with recipe items.
  $node->content['recipe_description'] = array(
      '#markup' => theme('recipe_description', array('node' => $node)),
  );

and added them to the section right above it so that it now looks like

  // If it is a teaser, you're done.
  // The teaser should have a full $node object, but not the $node->content render array.
  if ($view_mode == 'teaser') {

	// Begin filling the node->content array with with recipe items.
	$node->content['recipe_description'] = array(
      '#markup' => theme('recipe_description', array('node' => $node)),
	);

  return $node;
  }


  // Begin filling the node->content array with with recipe items.
  $node->content['recipe_description'] = array(
      '#markup' => theme('recipe_description', array('node' => $node)),
  );

Now it adds the description title and text in my node teasers.

efiniste’s picture

Thanks Taps7734, that little snippet just worked for me too.

Steve

doitDave’s picture

Category: support » bug

Subscribed, needs fixing in the release. IMO this is a bug report, because to a new site builder it would appear clearly that a teaser is possible. So I hope you won't mind my changing the category. (Correct it if you feel different.) Thx!

jvandervort’s picture

Status: Active » Needs review
StatusFileSize
new1.79 KB

Note this is not a full support for a trimmed teaser description, but it will add a full length description. Also if you want to turn off the description to return to the current functionality, the admin/structure/types/manage/recipe/display/teaser does work to turn it off. Also since this adds a theme function, you'll need to clear your caches.

Status: Needs review » Needs work

The last submitted patch, add-desc-to-teaser-1219260-1.patch, failed testing.

jvandervort’s picture

StatusFileSize
new1.79 KB

Trying again.

jvandervort’s picture

Status: Needs work » Needs review
jvandervort’s picture

StatusFileSize
new1.79 KB

Status: Needs review » Needs work

The last submitted patch, add-desc-to-teaser-1219260-1.patch, failed testing.

jvandervort’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
jvandervort’s picture

Status: Needs work » Needs review

#10: add-desc-to-teaser-1219260-1.patch queued for re-testing.

dcam’s picture

I'm a little worried about the recipe descriptions suddenly appearing in the teasers if someone decides to update the module. I guess since it's configurable via the Fields UI then maybe it's not a big deal. Maybe inconveniencing some sites is better than others not having the ability to include the description in teasers at all. What do you think?

jvandervort’s picture

Some impact, yes, but not too much. Overall I think the good outweighs the risk since we are moving toward the Drupal default. Of course if sites have really long descriptions and use current name-only front page list they will get a much longer display. We also can leave it in dev for a while. Folks upgrading to dev expect little changes like this.

dcam’s picture

Everything looks good to me. I added a quick test.

dcam’s picture

Status: Needs review » Reviewed & tested by the community
doitDave’s picture

What #15 says. (Re-)establishing expected behaviour is no evil. And then, there is the famous "releaase notes" field. A site builder not reading what he is updating to is not in the position to complain about surprise effects. Fullstop. :-)

jvandervort’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.