Yes, I know this may very well start some more of the heated debate about teasers, but I have to do it any way.

There is an annoying little "bug" with teasers when one uses the break tag. When it is at the end of the body (the length is real close the trim setting), it gets stripped off. So when modules (including node.module itself) checks to see if the body and teaser lengths are the same the test fails and a "read more" link is generated, even though the whole body is there.

The simplest way to fix this is to include the break tag in the output, which my patch does. Since the break tag is an HTML comment, it won't display. In addition to fixing the problem, this could be a useful debugging feature for webmistresses who are trying to track down little quirks like this one.

CommentFileSizeAuthor
teaser_10.patch478 bytesnancydru

Comments

nancydru’s picture

Wow, not one comment in 4 weeks.

bennybobw’s picture

Status: Needs review » Closed (duplicate)

Hello nancyw. I think there may not have been a response because this looks like it is a duplicate of http://drupal.org/node/34135
This problem also drives me nuts, so i'm going to bump it up again, but in the other thread.

bennybobw’s picture

Hello nancyw. I think there may not have been a response because this looks like it is a duplicate of http://drupal.org/node/34135
This problem also drives me nuts, so i'm going to bump it up again, but in the other thread.

bennybobw’s picture

Hello nancyw. I think there may not have been a response because this looks like it is a duplicate of http://drupal.org/node/34135
This problem also drives me nuts, so i'm going to bump it up again, but in the other thread.

nancydru’s picture

It looks like the other one is more for when there is no teaser. In the case I found this, there was a teaser, but because the break tag got stripped, the lengths didn't match and a "read more" was generated when it shouldn't have been.

bennybobw’s picture

nancyw, I've posted a patch in the other thread http://drupal.org/node/34135 that doesn't use the length of the teaser as a criteria for generating the readmore link. See #12 for the reason why. But maybe you have some ideas about when the readmore link should be generated that you could post over there.