Closed (works as designed)
Project:
Drupal core
Version:
x.y.z
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Nov 2004 at 17:02 UTC
Updated:
22 Aug 2005 at 11:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
DocSavage commentedThe current version of node.module, when crafting teasers without any helper teaser module, looks for the break tag and simply uses the entire body for a teaser if any php code is present. It does that to prevent breaking php code in the middle, but when php code is included for documentary purposes, this is unnecessary. This bug is most obvious when using the codefilter module, since php code is specifically used for documentation.
This patch to node.module replaces the "if any php code then use body as teaser" with code that sets teaser break points to the beginning of the php block. It's assumed that there will be some comment before showing the code, which suffices for a teaser.
Comment #2
Steven commentedYour patch does not comply to code standards (don't use tabs, don't add comments about who added it).
Reclassifying under node.module / core.
Comment #3
Uwe Hermann commentedThis is still a problem in HEAD. Attached patch (slightly modified version of the patch by DocSavage) fixes the bug. Please review / test.
Comment #4
Steven commented-1... the original issue talked about PHP highlighting (with codefilter.module), not evaluated PHP code (in filter.module). Since then we've added that check to see if the PHP code evaluating filter is actually used or not.
So this patch only affects custom PHP code teasers, which IMO should be created by the admin using excerpt.module instead.