Unrecognized Tag Warning 2.0
February 19, 2003
- updated February 8, 2006
When MovableType parses templates, it looks at every tag that begins with MT (or $MT). If the tag is recognized by MovableType - or an installed plugin - then the tag and its contents are processed and displayed in the resulting page.
However, if the tag is not recognized, MovableType quietly discards it, and you’re none the wiser unless you notice that the generated page is not correct.
This hack modified MovableType to display an error whenever it encounters an MT tag it does not recognize. This enables you to catch problems with your templates whenever you rebuild you pages.
Go to your MovableType installation directory, and open the file Builder.pm in the lib/MT subdirectory. Find the line that says:
my($h) = $ctx->handler_for($t->);
and insert the following line after it:
return $build->error("Unrecognized MovableType tag <MT$t->>") unless $h;
In MovableType 2.5 and 2.6, this modification is on line 115.