In the current version of node_teaser, teasers for nodes having both the PHP filter and at least one occurrence of the XML PI directive (<?) are always built as the whole node. According to the API site, this is to avoid splitting code when generating the teaser.

Notwithstanding the fact that no sane site maintainer would probably insert <!--break--> at a point where it would break his PHP code, making this test of dubious value, there is a case where a proper teaser can be generated: that is, when the PI directive occurs only AFTER the <!--break--> in which case, generating the shortened teaser does not look like it could break anything.

The attached one-half-line patch allows this behaviour.

Since the HEAD verison of node.module today (1.687) uses the same test, it should also work on it.

CommentFileSizeAuthor
node.module_43.patch674 bytesfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

killes@www.drop.org’s picture

Version: 4.7.3 » x.y.z

moving to cvs to get more reviews. will backport if committed.

drumm’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)
fgm’s picture

Version: x.y.z » 4.7.3
Status: Closed (fixed) » Reviewed & tested by the community

Killes said he would backport if committed...

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

backported

fgm’s picture

Status: Fixed » Closed (fixed)

Thanks