i2-Services, Inc. Forums

Full Version: Fatal error: Smarty error in user_view.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For some reason, after making a minor edit in the user_view.php file, I am getting the following error message when trying to load the page after logging in:

Code:
Fatal error: Smarty error: [in ../interface/user_view.php line 61]: syntax error: unrecognized tag: $created|date_format:"%A, %B %e, %Y - %H:%M:%S" (Smarty_Compiler.class.php, line 439) in G:\xampp\htdocs\webs\kboy2\php_mm\libs\Smarty.class.php on line 1095


Here is the part of the file with the offending statement.  

Code:
              <form action="{$SCRIPT_NAME}" method="post">
                <input type="hidden" name="_p" value="_edit_user" />
                <input type="hidden" name="num" value="{$num}" />
                <fieldset>
                <legend>Account Profile&nbsp;</legend>
                <table width="100%" cellpadding="3" cellspacing="3" class="fixed12pt">
                  <tr>
                    <td align="center" colspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" bgcolor="#EEEEEE">
                    <a href="{$SCRIPT_NAME}">View Account</a>&nbsp; | &nbsp;
                    <a href="{$SCRIPT_NAME}?edit_account=1">Edit Account</a>&nbsp; | &nbsp;
                    <a href="{$SCRIPT_NAME}?unsubscribe=1">Cancel Account</a>&nbsp; |&nbsp;
                    <a href="{$SCRIPT_NAME}?logoff=1">Log Off</a><br /></td>
                  </tr>
                  <tr>
                    <td valign="top">&nbsp;</td>
                    <td valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="120" valign="top">Account Created</td>
                    <td valign="top"> {$created|date_format:&quot;%A, %B %e, %Y - %H:%M:%S&quot;} </td>
                  </tr>
                  <tr>
                    <td valign="top">Last Modified</td>
                    <td valign="top"> {$modified|date_format:&quot;%A, %B %e, %Y - %H:%M:%S&quot;} </td>
                  </tr>
                  <tr>
                    <td valign="top">Account Expires</td>
                    <td valign="top"> {if ($expires == &quot;0000-00-00&quot;) }
                        No Expiration
                        {else}
                      {$expires|date_format:&quot;%B %e, %Y&quot;} {/if} </td>
                  </tr>


Any ideas?  I don't recall making any edits to that code.

The the code portion of your post i'm seeing:

{$created|date_format:&quot;%A, %B %e, %Y - %H:%M:%S&quot;}

Did it change some quotes to an html entity?  IE :  &quot;  ?

Should be:

{$created|date_format:"%A, %B %e, %Y - %H:%M:%S"}
That was the problem.

The conversion of the code took place when I used Dreamweaver CS3 to apply a new template to the page. A good watch out for others that might be doing something similar to wrap the code.

Solved!
Reference URL's