Go to content Go to blog navigation Go to link heaven

Templation

Recent Updates

Recent Articles

Search

RSS feed Atom feed

Recursive Body Bug Squashed

2005.10.20 23:46

Originally the meta body was the contents of the body tag. As of beta 2, the entire document becomes the meta body if no body tag is found. This concept seemed to be a no-brainer, but I made one mistake in the implementation.

Templation depends on an include at the top of the page to do its magic. But it builds output from the page that included it, so the include statement needs to be stripped. In general this works great, but under circumstances where there is additional code in the opening PHP block, the logic failed. For example, if your source file was:


<?php
include('Templation/driver.php');
print
"We don't need no stinkin' body!";
?>

The body would become this entire block with the include statement intact. leading_php would also contain this block, but with the include stripped. So you would see the print statement execute once for <%%leading_php%%> and then repeat indefinitely in the <%%body%%> tag as the driver script executed over and over.

The fix was just to drop the opening PHP block from the implicit body, and is available immediately in svn.

Comments