Creating a node with php input and editing it like below
let 'hello2' be displayed also on teasers on node listing pages.
(I had to separate minus from 'break' to let drupal.org post this)


hello
< !-- break -- >

<?php
print 'hello2';

?>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Assigned: Unassigned » chx
Status: Active » Reviewed & tested by the community
FileSize
1.09 KB

[20:14] chx: what's our take with PHP node teasers?
[20:14] chx: if I have a PHP node which spits out 50K of text (just tested) then the teaser will be 50K long
[20:14] chx: not nice.
[20:14] UnConeD: chx: dries wanted to change it to support break
[20:14] UnConeD: and have it be your own fault if you make parse errors

chx’s picture

FileSize
679 bytes

one hunk too more.

Steven’s picture

Status: Reviewed & tested by the community » Needs work

Actually, what we /should/ do for PHP code is to use the break tag if it's there, but do no automatic splitting otherwise (because that is surely to result in problems).

JohnAlbin’s picture

Version: x.y.z » 5.x-dev
FileSize
893 bytes

Taking Steven's advice, we get... (for 4.7)

JohnAlbin’s picture

FileSize
893 bytes

And... (for 5.x-dev)

JohnAlbin’s picture

Status: Needs work » Needs review
FileSize
1.08 KB

New patch for 4.7.x-dev undoes (now unneeded) code added in http://drupal.org/node/80989

JohnAlbin’s picture

FileSize
1.11 KB

New patch for 5.x-dev undoes (now unneeded) code added in http://drupal.org/node/80989

Steven’s picture

Version: 5.x-dev » 4.7.x-dev
Status: Needs review » Reviewed & tested by the community

Committed to HEAD, works as advertised. Good job.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)