Page 1 of 1

Formbuilder displays error text then on refresh it goes away

Posted: Wed Jun 30, 2010 1:53 am
by Muscleworx
I can't figure this out but what is happening is the first time a page with a form is opened it shows the following text and I simply don't understand it - sorry  >:(

On refreshing the page it goes away... and suggestions as to how to fix would be most welcome!

string(169) "Smarty error: [in module_db_tpl:FormBuilder;fb_4 line 74]: syntax error: mismatched tag {/strip}. expected {/if} (opened line 39). (Smarty_Compiler.class.php, line 2303)" string(171) "Smarty error: [in module_db_tpl:FormBuilder;fb_4 line 75]: syntax error: mismatched tag {/if}. expected {/foreach} (opened line 38). (Smarty_Compiler.class.php, line 2303)" string(171) "Smarty error: [in module_db_tpl:FormBuilder;fb_4 line 76]: syntax error: mismatched tag {/foreach}. expected {/if} (opened line 17). (Smarty_Compiler.class.php, line 2303)"

Re: Formbuilder displays error text then on refresh it goes away

Posted: Wed Jun 30, 2010 2:47 am
by kendo451
This is happening  because you have an unclosed {if} statement in one of your templates.  It is encountering the {/strip} tag at the end of the template and giving an error  because there was no {/if}.

It is most likely in your page template or page content.

If you want help you'll need to post your templates.

Re: Formbuilder displays error text then on refresh it goes away

Posted: Thu Jul 01, 2010 2:35 am
by Muscleworx
Thanks for that!

Not sure if this is the offedning template but her it is anyway...

{* DEFAULT FORM LAYOUT / pure CSS *}
{$fb_form_header}
{if $fb_form_done == 1}
{* This first section is for displaying submission errors *}
{if isset($fb_submission_error) && $fb_submission_error}
{$fb_submission_error}
{if isset($fb_show_submission_errors) && $fb_show_submission_errors}


{foreach from=$fb_submission_error_list item=thisErr}
{$thisErr}
{/foreach}


{/if}
{/if}
{else}
{* this section is for displaying the form *}
{* we start with validation errors *}
{if isset($fb_form_has_validation_errors) && $fb_form_has_validation_errors}


{foreach from=$fb_form_validation_errors item=thisErr}
{$thisErr}
{/foreach}


{/if}
{if isset($captcha_error) && $captcha_error}
{$captcha_error}
{/if}

{* and now the form itself *}
{$fb_form_start}
{$fb_hidden}

{if $total_pages gt 1}{$title_page_x_of_y}{/if}
{foreach from=$fields item=entry}
{if $entry->display == 1}

        {if $entry->needs_div == 1}
            required == 1 || $entry->css_class != '' || $entry->valid == 0} class="
              {if $entry->required == 1}required{/if}
              {if $entry->css_class != ''} {$entry->css_class}{/if}
                    {if $entry->valid == 0} fb_invalid{/if}
              "
            {/if}
            >
        {/if}
        {if $entry->hide_name == 0}
            multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}
            {if $entry->required_symbol != ''}
              {$entry->required_symbol}
            {/if}
           
        {/if}
        {if $entry->multiple_parts == 1}
            {section name=numloop loop=$entry->input}
              {if $entry->label_parts == 1}
              {$entry->input[numloop]->input} {$entry->input[numloop]->name}
              {else}
              {$entry->input[numloop]->input}
              {/if}
              {if isset($entry->input[numloop]->op) && $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}
            {/section}
        {else}
            {if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
        {/if}
        {if $entry->valid == 0} <--- {$entry->error}{/if}
        {if $entry->needs_div == 1}
           
    {/if}
        {/strip}
    {/if}
{/foreach}
{if $has_captcha == 1}
{$graphic_captcha}{$title_captcha}
{$input_captcha}
{/if}
{$prev}{$submit}

{$fb_form_end}
{/if}
{$fb_form_footer}

Re: Formbuilder displays error text then on refresh it goes away

Posted: Thu Jul 01, 2010 3:07 am
by kendo451
That's not the template where the problem is.  Show your page template, and also the content of the page that the form is located in, please.

Re: Formbuilder displays error text then on refresh it goes away

Posted: Wed Jul 07, 2010 1:07 am
by Muscleworx
Oki Doki...

page at http://www.muscleworx.co.nz/index.php?page=contact

Thanks for having patience with a newbie :-)


{process_pagedata}

{* Change lang="en" to the language of your site *}

{* note: anything inside these are smarty comments, they will not show up in the page source *}

 
    {sitename} - {title}
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{stylesheet}
{* This is how all the stylesheets attached to this template are linked to it *}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optimization *}

{* the literal below and the /literal at the end are needed whenever there are {"curly brackets"} as smarty will think it's something to process and will throw an error *}
{literal}

=b){nw=b+"px";}if(w

   
   
    #pagewrapper {width:expression(P7_MinMaxW(720,950));}
    #container {height: 1%;}
   
   
    {/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Top menu + 2 columns" *}

   
   
   
{* The above JavaScript is required for CSSMenu to work in IE *}
 
 
   

{* start accessibility skip links, anything with the class of accessibility is hidden with CSS from visual browsers *}
     
        {anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}
        {anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}
     
{* end accessibility skip links *}

     
{* Horizontal ruler that is hidden for visual browsers by CSS *}

{* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet  "Layout: Top menu + 2 columns" *}
     

{* this holds the name of the site on the right side *}
       

{* a link back to home page and the header left image/logo, text is hidden using CSS *}
            {cms_selflink dir="start" text="$sitename"} 
       
     
{* End Header *}

{* Start Navigation *}
     
{* stylesheet  "Navigation: CSSMenu - Horizontal" *}
        Navigation
        {menu template='cssmenu.tpl'}
       
     
{* End Navigation *}

{* Start Search, the input "Submit" is using an image, CSS: input.search-button *}
     
      {search}
     
{* End Search *}

{* Start Breadcrumbs *}
     
{* holds the right image, we need 2 divs to be able to make this site fluid, if it was fixed width we could use one div, one image  *}

       
        {breadcrumbs starttext='You are here' root='Home' delimiter='»'}
         
       
     
{* End Breadcrumbs *}

{* Start Content *}
     

{* Start Sidebar *}
       
         
{* Start News, stylesheet  "Module: News" *}
           
          {global_content name='randomimage'}
           
{* End News *}

          {content block='Sidebar'}

         
       
{* End Sidebar *}

{* Start Content Area, the back1, back2, back3, hold the 3 outside images, main holds the 4th one, to make the box complete, if the template were fixed width not fluid we could use just 2 divs and 2 images, 1 top 1 bottom *}
       
         
           
             
                {print showbutton=true script=true}
                {title}
                {content}
               
{* to insure space below content *}

{* Start relational links *}
{* note this is the right side, when you float: divs you need to have float: right; divs first *}
           
              {anchor anchor='main' text='^ Top'}
           
           
              {cms_selflink dir="previous" label="Previous page: "}
{* The label parameter doesn't need to be there if you're using English, but is here to show how it's used if you don't want the English text "Previous page" *}

             

              {cms_selflink dir="next"}
             
           
{* End relational links *}

               
               
             
           
         
       
{* End Content Area *}

     
{* End Content *}

{* Start Footer. Edit the footer in the Global Content Block called "footer" *}
     
       
{* stylesheet  "Navigation: FatFootMenu" *}
         
         
         
          {global_content name='footer'}
         
         
       
     
{* End Footer *}

   
{* end pagewrapper *}

 

Re: Formbuilder displays error text then on refresh it goes away

Posted: Wed Jul 14, 2010 2:33 pm
by kendo451
On your site it looks like you found the offending template.  Mind marking [solved] on the topic of this post?

Thanks.

Ken

Re: Formbuilder displays error text then on refresh it goes away

Posted: Thu Jul 15, 2010 12:58 am
by Muscleworx
Strangest thing is it is there one time and after the page is refreshed it goes away - then next session back again... so not so much solved yet:-(