The Movable Type Knowledge Base

Smarty Error On Dynamic Pages

Question

When trying to view a page I have chosen to publish dynamically, I get a Smarty error.

Answer

Error message: plugin function smarty_function_MTSomeTag() not found in /path/to/mt/php/lib/function.MTSomeTag.php, where SomeTag is the name of a standard Movable Type Template Tag

Make sure the file (i.e., function.MTSomeTag.php) was uploaded to your server in ASCII mode, and that it is located in the php/lib/ folder in your Movable Type installation directory.

Error message: unrecognized tag MTSomeTag, where SomeTag is the name of a Plugin Template Tag

Existing plugins may not be compatible with dynamic publishing, since they are written in Perl and not PHP. If you are seeing errors due to using plugin tags, you will either need to remove the tag(s) or change that template to render statically.

Contact the plugin author or check the Plugins Directory to find out if an updated, PHP-compatible version of the plugin is available.

Error message: mismatched tag {/if}

You have a closing IF tag in your template without the corresponding opening tag. You will need to locate the tag causing the problem in your template, and either remove it, or add the appropriate opening tag somewhere prior to the closing tag.

Error message: the $compile_dir '/path/to/your/weblog/templates_c' does not exist, or is not a directory.

Make sure the templates_c folder has been created in your weblog's root folder, with permissions set to 777.

Helpful Hint

The Smarty error may include a reference to the template ID and the line number in that template where the problem occurs. For example:

Smarty error: [in mt:35 line 257]

In this example, 35 is the template ID and 257 is the line number. You can determine the ID of a template by viewing the URL in your browser's status bar while hovering over the Template Name:

http://www.example.com/mt/mt.cgi?__mode=view&_type=template»
  &id=35&blog_id=1

(Line break indicated by » added for display purposes.)

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.