ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Allow Comments Bug - eval()’d code on line 149 error

May 27, 2008 12:31pm

Subscribe [2]
  • #1 / May 27, 2008 12:31pm

    PixelFive

    17 posts

    Site: http://www.noozhawk.com

    One this article: http://www.noozhawk.com/index.php/local_news/article/0523_santa_barbaras_icon_father_virgil_cordano_dies_at_89

    if I “allow comments” under the “options” tab I get this error:

    Parse error: syntax error, unexpected T_STRING in MY_PATH/core/core.functions.php(637) : eval()‘d code on line 149

    if I disable comments, the article shows up just fine (although, no one can comment on it). Any thoughts on why?  In only happens on this article.

    [Mod edit: moved to Technical Support forum]

  • #2 / May 27, 2008 1:02pm

    Derek Jones

    7561 posts

    Welcome to the forums, noozhawk.  I’ve moved your post to the Technical Support forum so our support staff can readily assist you in resolving this issue.

    Can you post your local_news/article template code here, and the posted contents of the entry please?  The error you are getting is indicative of either a PHP syntax error in your template, or malformed ExpressionEngine conditionals.  There may be an interaction with the posted content of the entry as well since it’s only happening as you say with this one entry, so please post both.  If necessary, feel free to save to text files, zip and attach!

  • #3 / May 27, 2008 1:31pm

    PixelFive

    17 posts

    local_news/article:

    {embed="noozhawk/page_header" page_title="Home"}
    {embed="noozhawk/page_top"}
          <div id="content">
            <div id="article_left_column">
              <div id="ads_468x60">
                <!-- JAVASCRIPT AD CODE HERE… -->
              </div>
              <!-- ARTICLE -->
              <div id="article_content">
              {exp:weblog:entries weblog="articles" disable="member_data|trackbacks|pagination"}
                {categories}<a href="http://{path=local_news}">{category_name}</a> »{/categories}{title}
                <h2>{title}</h2>
    <p>             By <span class="article_author">{created_by_alias}</span> | Posted on {month}/{day}/{year}<br />
                <br />
                  <a href="http://{permalink=noozhawk/email}">{site_url}/images/icon_email.gif <span class="print_comment_email">EMAIL</span></a><br />
                  <a href="http://{permalink=noozhawk/print}">{site_url}/images/icon_print.gif <span class="print_comment_email">PRINT FRIENDLY</span></a><br />
                  <a href="#comments">{site_url}/images/comment_icon.gif <span class="print_comment_email">COMMENT</span></a><br />
                <br />
                {site_url}/images/article_divider.gif<br />
                {introtext}<br />
                {fulltext}<br />
                {site_url}/images/article_divider.gif<br />
              {/exp:weblog:entries}<br />
              {exp:comment:form preview="weblog/preview"}<br />
              {exp:weblog:entries weblog="articles"}<br />
              <a href="http://{title_permalink=local_news/article}%22name=%22comments%22&gt&lt/a&gt" class="{switch=" style="width:140px;">{title}</a></h3><br />
                  {created_by_alias}<br />
                {/exp:weblog:entries}<br />
              </div><br />
              <div id="internal_180x150">   <br />
                <!-- JAVASCRIPT AD CODE HERE… -->                                                              <br />
              </div><br />
              <br clear="all"><br />
              Advertisement<br />
              <div id="ad_home_skyscrapper"><br />
               <!-- skyscrapper --><br />
                <!-- JAVASCRIPT AD CODE HERE… --><br />
              </div><br />
              <br clear="all"><br />
              </div><br />
              <br clear="all"><br />
              <div id="bottom_leaderboard"><br />
              <!-- JAVASCRIPT AD CODE HERE… --><br />
              </div><br />
              {embed="noozhawk/page_bottom"}

     

    [Mod edit: added [code][/code] tags for legibility]

  • #4 / May 27, 2008 1:36pm

    PixelFive

    17 posts

    Attached is the posted content. Thanks for the help

  • #5 / May 27, 2008 1:47pm

    Derek Jones

    7561 posts

    Thanks noozhawk.  The entry content appears to have truncated, but looking at your template code, I see that you have some tags nested, which should be corrected.  The weblog entries tag within the comment form tag, specifically.  I would recommend fixing that first, e.g. moving the weblog entries tag outside of the comment form tag; neither of those tags are designed to be used nested within other tags.  But the direct source of the problem appears to be with your conditionals.

    {if {comment_tb_total}>0}
         ({comment_tb_total})
    {/if}

    Variables used in conditionals should not be braced.  You may find this Knowledge Base article helpful in understanding proper conditionals syntax: Troubleshooting Conditionals.

  • #6 / May 27, 2008 2:55pm

    PixelFive

    17 posts

    That’s it.

    Changing that piece of code to:

    {if comment_tb_total>0}
        ({comment_tb_total})
    {/if}

    (where “comment_tb_total” inside the conditional statement is not braced) made it work. Thanks for the help

  • #7 / May 27, 2008 3:09pm

    Derek Jones

    7561 posts

    No problem, noozhawk, glad to help!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases