Page 1 of 1

FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 2:30 pm
by upwithit
Hi,
I'm running a site on 1.11.8 “Fioreana”, with News v2.13 and FormBuilder version 0.7.4.
Prior to a recent upgrade, I used to be able to include forms in the Content field of a news item, but now when I do so, upon trying to access the news detail page, it hangs for a while. The detail page eventually loads, but where the form should be I get the following error (I've replace my server paths with "PATHTOROOT"):

Warning: file(/PATH_TO_ROOT/lib/smarty/sysplugins/smarty_internal_templatebase.php(147) : eval()'d code) [function.file]: failed to open stream: No such file or directory in /PATH_TO_ROOT/lib/misc.functions.php on line 2274

Fatal error: Maximum execution time of 30 seconds exceeded in /PATH_TO_ROOT/lib/misc.functions.php on line 2279

Any help would be very much appreciated. Thank you!

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 3:08 pm
by staartmees
upgrade news to 2.14.1, clear cache. If error still occurs, post template.

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 3:14 pm
by Jo Morg
upwithit wrote:I'm running a site on 1.11.8 “Fioreana”, with News v2.13 and FormBuilder version 0.7.4.Prior to a recent upgrade, I used to be able to include forms in the Content field of a news item, but now when I do so, upon trying to access the news detail page, it hangs for a while.
I'm not sure if it is related, but the latest version of FormBuilder (0.7.4) has a few problems. Try to rollback to the previous version. HTH

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 4:08 pm
by upwithit
I had actually upgraded to this FormBuilder version in the hopes that it would fix things, but unfortunately it didn't.
I'll try upgrading the News Module to see if it works. Stand by...

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 5:34 pm
by upwithit
That unfortunately didn't work. I've tried it out with the default templates and the result was the same.

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 5:51 pm
by velden
Is your php version 5.3+? Not sure if that's the issue, but reading the comments in the 'misc.functions.php':
// this class must exist in this file until CMSMS 1.12 when we dont have to worry abut PHP 5.2
// this file is loaded before the autoloader runs.

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 14, 2013 5:53 pm
by Jo Morg
TBH there is something intriguing me:
upwithit wrote:Warning: file(/PATH_TO_ROOT/lib/smarty/sysplugins/smarty_internal_templatebase.php(147) : eval()'d code) [function.file]: failed to open stream: No such file or directory in /PATH_TO_ROOT/lib/misc.functions.php on line 2274Fatal error: Maximum execution time of 30 seconds exceeded in /PATH_TO_ROOT/lib/misc.functions.php on line 2279
If anybody is to attempt to look into it, more info is needed:
  • - with which version of CMSMS and FormBuilder was it working if ever;
  • - what steps did you take to upgrade;
  • - at which version of CMSMS did you get this error for the 1st time;
  • - system info;
  • - etc...
http://forum.cmsmadesimple.org/viewtopi ... =40&t=2661

Please be as accurate as possible.

Re: FormBuilder - Forms Not Working in News Module

Posted: Tue Nov 26, 2013 11:15 am
by map_1961
I run cmsms 1.11.9 with ...
news 2.14.1
and formbuilder 0.7.3

(environment: php 5.4.21)

If i place a formbuilder call into news body this crashes the page as no stylesheet is draged.

Thx 4 help in this case

map_1961

Update: i just placed a simple formbuilder tag into am emty news on out dev page. The form is called but it chrashes the stylesheet.
cmsms: 1.11.7
Formbuilder 0.7.3
News 2.12.12.

Pls. find the result in here:
http://dev.papageienpark-bochum.de/news ... News-Test/

cheers map

Re: FormBuilder - Forms Not Working in News Module

Posted: Tue Nov 26, 2013 12:13 pm
by chandra
Why do you want to do such things inside News module?

Isn't it easier to assign the relevant variable to another one and use Formbuilder like an attachment?

Re: FormBuilder - Forms Not Working in News Module

Posted: Tue Nov 26, 2013 12:55 pm
by velden
map_1961 wrote: ...
If i place a formbuilder call into news body this crashes the page as no stylesheet is draged.

...

Update: i just placed a simple formbuilder tag into am emty news on out dev page. The form is called but it chrashes the stylesheet.
...

Fatal error: Cannot use object of type stdClass as array in /homepages/16/d184975754/htdocs/papageienpark2/tmp/templates_c/CGFeedback^9d1aa41aa485e06c08edf765958055b3deae8a1c.module_db_tpl.CGFeedback;commentform_papabo.php on line 136
Stylesheets is not your main problem. Template stops to be processed as soon as the error occurs. Seems to be CGFeedback related.

Re: FormBuilder - Forms Not Working in News Module

Posted: Tue Nov 26, 2013 1:34 pm
by Jo Morg
Fatal error: Cannot use object of type stdClass as array in /<.....>/htdocs/papageienpark2/tmp/templates_c/CGFeedback^9d1aa41aa485e06c08edf765958055b3deae8a1c.module_db_tpl.CGFeedback;commentform_papabo.php on line 136
This appears to be a Smarty syntax error on a CGFeedback form template. Apparently you are using the dot (.) notation instead of the -> on some variable call.

Code: Select all

{* dummy vars sample *}
{$foo.bar} {* for arrays *}
{$foo->bar} {* for objects *}
 
You should debug your template to see where it goes wrong.

Re: FormBuilder - Forms Not Working in News Module

Posted: Tue Nov 26, 2013 5:56 pm
by map_1961
--> chandra: we like 2 do this inside newsmodule because thus we can use news ...we use as a blog... almost as a landingpage as well. If we place the link to the blog including formbuilderform (i.e. 4 registration of an event) to socal media users can get all information + registration form with one click!

--> Jo Morg
Hm. We are content people = 2 stupid 4 coding stuff.

That's the cg-feedback template - maybe u find the bug??:

Code: Select all

{* comment form template *}
{if isset($message)}
  <div class="pagemessage">{$message}</div>
{else}
{* no message... display the form *}
<div class="cgfeedback_addcoment">
{if isset($error)}
  <div class="error">{$error}</div>
{/if}
{$formstart}

  <h3><legend>&nbsp;{$mod->Lang('prompt_add_comment')}&nbsp;</legend></h3>

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$mod->Lang('prompt_title')}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
      <input type="text" name="{$actionid}title" size="50" maxlength="255" value="{$title}"/>
    </div>
  </div>
  <div class="clearfix"></div>

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$mod->Lang('prompt_your_name')}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
      <input type="text" name="{$actionid}author_name" size="40" maxlength="255" value="{$author_name}"/>
    </div>
  </div>
  <div class="clearfix"></div>

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$mod->Lang('prompt_your_email')}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
      <input type="text" name="{$actionid}author_email" size="40" maxlength="255" value="{$author_email}"/>
    </div>
  </div>
  <div class="clearfix"></div>

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$mod->Lang('prompt_notify')}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
      <input type="checkbox" name="{$actionid}author_notify" value="1" {if $author_notify == 1}checked="checked"{/if}/>
    </div>
  </div>
  <div class="clearfix"></div>


  <div class="clearfix"></div>

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$mod->Lang('prompt_comment')}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
      {$input_comment}
    </div>
  </div>
  <div class="clearfix"></div>

  {* custom fields *}
  {if isset($fields)}
  {foreach from=$fields key='fieldid' item='field'}
  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$field.name}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
    {if isset($field.input)}
      {$field.input}
    {elseif $field.type == 0 or $field.type == 1 }
      <input type="text" name="{$actionid}field_{$fieldid}" value="{$field.value}" size="{$field.attrib.length}" maxlength="{$field.atrrib.maxlength}"/>
    {elseif $field.type == 2}
      {* text area fields should have an input... so this should never get caled... but just in case *}
      <textarea name="{$actionid}field_{$fieldid}">{$field.value}</textarea>
    {elseif $field.type == 3}
      <select name="{$actionid}field_{$fieldid}">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {elseif $field.type == 4}
      <select multiple="multiple" size="4" name="{$actionid}field_{$fieldid}[]">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {/if}
    </div>
  </div>
  {/foreach}
  {/if}

  {if isset($captcha_img)}
     {* handle captcha image *}
     <div class="row" style="margin: 1em;">
       <div class="col30" style="float: left; width: 29%;">&nbsp;</div>
     <div class="col70" style="float: left; width: 70%;">
      {$captcha_img} <br/>
      Code aus Bild:<input type="text" name="{$actionid}feedback_captcha" value="" size="15"/>
    </div>
  </div>
  {/if}

  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
       &nbsp;
    </div>
    <div class="absenden" style="float: left; width: 70%;">
      <input type="submit" name="{$actionid}submit" value="{$mod->Lang('submit')}"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<__script__ type="text/javascript">
function FensterOeffnen (Adresse) {
  MeinFenster = window.open(Adresse, "Zweitfenster", "width=640,height=400,scrollbars=yes,toolbar=no,status=no,menubar=no,location=no");
  MeinFenster.focus();
}
</__script>

<a href="{cms_selflink href='richtlinien-fuer-lesermeinungen' }" onclick="FensterOeffnen(this.href); return false"><span style="color: #e2001a;">Richtlinien für Lesermeinungen</span></a>

    </div>
  </div>
  <div class="clearfix"></div>


{$formend}
</div>
{/if}
If you mean the templates from the module (directory CGFeedback/templates/xyz....tpl - we use the standard files coming with the module and don't change anything in this.

Thx 2 everybody who answers forum things

Cheers

Map_1961

Re: FormBuilder - Forms Not Working in News Module

Posted: Wed Nov 27, 2013 1:15 pm
by Jo Morg
I couldn't look further into this... having a few predicaments of my own to solve...
However I would start by commenting out the following lines one by one an test if the error goes away or changes. That might allow you to pinpoint the problematic tag.

Code: Select all

 
...

 {* custom fields *}
  {if isset($fields)}
  {foreach from=$fields key='fieldid' item='field'}
  <div class="row" style="margin: 1em;">
    <div class="col30" style="float: left; width: 29%;">
      {$field.name}:
    </div>
    <div class="col70" style="float: left; width: 70%;">
    {if isset($field.input)}
      {$field.input}
    {elseif $field.type == 0 or $field.type == 1 }
      <input type="text" name="{$actionid}field_{$fieldid}" value="{$field.value}" size="{$field.attrib.length}" maxlength="{$field.atrrib.maxlength}"/>
    {elseif $field.type == 2}
      {* text area fields should have an input... so this should never get caled... but just in case *}
      <textarea name="{$actionid}field_{$fieldid}">{$field.value}</textarea>
    {elseif $field.type == 3}
      <select name="{$actionid}field_{$fieldid}">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {elseif $field.type == 4}
      <select multiple="multiple" size="4" name="{$actionid}field_{$fieldid}[]">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {/if}
    </div>
  </div>
  {/foreach}
  {/if}
...

 
Look for vars like $field.name, $field.attrib.options, etc, and comment them out by enclosing them in {*.....*} tags.
This way it may be easier to debug the template.

Re: FormBuilder - Forms Not Working in News Module

Posted: Thu Nov 28, 2013 6:04 pm
by map_1961
Thankx - i am just fighting with the nms module that doens't process the bounces correctly. So the client is pushing from the one site -- the abuse department of the provider from the other site...
As soon as i solved this i will test that issue und let u know...

Thx

map_1961