Announcement

Collapse
No announcement yet.

T-String Error While Updating Template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • T-String Error While Updating Template

    While changing the template for article_edit in v3articles, I encountered the following error:

    The following error occurred when attempting to evaluate this template:

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gh/public_html/discuss/includes/adminfunctions_template.php(3054) : eval()'d code on line 271

    This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
    I was forced to revert the file so it would work again. Line 271 is:

    PHP Code:
    $queryJoin "\nLEFT JOIN " TABLE_PREFIX "template AS t$i ON (t1.title=t$i.title AND t$i.styleid=$setid)$queryJoin"
    from:

    PHP Code:
        $parents explode(','$style['parentlist']);
        
    $i sizeof($parents);
        
    $totalparents $i;
        foreach(
    $parents AS $setid)
        {
            if (
    $setid != -1)
            {
                
    $querySele ",\nt$i.templateid AS templateid_$i, t$i.title AS title$i, t$i.styleid$querySele";
                
    $queryJoin "\nLEFT JOIN " TABLE_PREFIX "template AS t$i ON (t1.title=t$i.title AND t$i.styleid=$setid)$queryJoin";
                
    $i--;
            }
        } 
    Any idea what to do, please?

  • #2
    That means on line 271 of the template

    Anyway, its most likely caused by a bad conditional

    Comment


    • #3
      Oh, haha. On the template. I'll go back and see what I did. All I did was replace an imported template ($blah) with custom code. Hmm

      Comment


      • #4
        Here's an odd one for ya.

        PHP Code:
        <if condition="($permissions['articlepermissions'] & CANDELOTHART)||(($permissions['articlepermissions'] & CANDELOWNART) && ($bbuserinfo[userid] == $article[articleuserid]))">
        <
        fieldset class="fieldset">
            <
        legend>Delete Article</legend>
            <
        div style="padding:$stylevar[formspacer]px">
                <
        div style="margin-bottom:$stylevar[formspacer]px">
        <
        div align="center">Delete this article? <input type="checkbox" name="dodelete" value="1" align="absmiddle" /></div>
                </
        div>
            </
        div>
        </
        fieldset>
        </if> 
        This is what's causing the problem. It actually isn't on that line, but when I take it out there's no error. The odd thing is that it has absolutely nothing to do with what I edited, yet the file updates fine if I just hit "submit" and don't change anything. Any ideas?

        Comment


        • #5
          Theres somthing about conditional I'd guess. Try stripping it down abit and see what happens.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X