Function "event content" works the special-purpose event data (such as start time and location) into the output by prepending it to the teaser and body:

$node->teaser = $output . ($node->teaser ? '<div class="content">'. check_output($node->teaser) .'</div></div>' : '</div>');
  $node->body = $output . ($node->body ? '<div class="content">'. check_output($node->body) .'</div></div>' : '</div>');

However, this modification of teaser and body is applied when an event node is previewed, with the result that the added event data is part of the body in the preview, and becomes stored as part of the body when the previewed node is submitted. Then, when the node is actually viewed, the event data gets prepended a second time, resulting in the event data appearing twice in the output.

The problem iterates: each time an item is previewed, another copy of the event data enters the body. Just try hitting preview a bunch of times in a row (without modifying the node) to see this phenomenon.

We have experienced this problem in 4.4, but an inspection of 4.5 shows the responsible code has not changed.

Comments

karger’s picture

Function "event content" works the special-purpose event data (such as start time and location) into the output by prepending it to the teaser and body:

$node->teaser = $output . ($node->teaser ? '<div class="content">'. check_output($node->teaser) .'</div></div>' : '</div>');
$node->body = $output . ($node->body ? '<div class="content">'. check_output($node->body) .'</div></div>' : '</div>');

However, this modification of teaser and body is applied when an event node is previewed, with the result that the added event data is part of the body in the preview, and becomes stored as part of the body when the previewed node is submitted. Then, when the node is actually viewed, the event data gets prepended a second time, resulting in the event data appearing twice in the output.

The problem iterates: each time an item is previewed, another copy of the event data enters the body. Just try hitting preview a bunch of times in a row (without modifying the node) to see this phenomenon.

We have experienced this problem in 4.4, but an inspection of 4.5 shows the responsible code has not changed.

killes@www.drop.org’s picture

Are you sure you aren't running php 5?

killes@www.drop.org’s picture

fixed in 4.6.

Anonymous’s picture