FormBuilder - Forms Not Working in News Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
upwithit
Forum Members
Forum Members
Posts: 21
Joined: Mon Jan 05, 2009 7:23 pm

FormBuilder - Forms Not Working in News Module

Post 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!
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: FormBuilder - Forms Not Working in News Module

Post by staartmees »

upgrade news to 2.14.1, clear cache. If error still occurs, post template.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
upwithit
Forum Members
Forum Members
Posts: 21
Joined: Mon Jan 05, 2009 7:23 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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...
upwithit
Forum Members
Forum Members
Posts: 21
Joined: Mon Jan 05, 2009 7:23 pm

Re: FormBuilder - Forms Not Working in News Module

Post by upwithit »

That unfortunately didn't work. I've tried it out with the default templates and the result was the same.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: FormBuilder - Forms Not Working in News Module

Post 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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
map_1961
Power Poster
Power Poster
Posts: 410
Joined: Fri Apr 20, 2007 7:26 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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
chandra

Re: FormBuilder - Forms Not Working in News Module

Post 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?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: FormBuilder - Forms Not Working in News Module

Post 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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
map_1961
Power Poster
Power Poster
Posts: 410
Joined: Fri Apr 20, 2007 7:26 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
map_1961
Power Poster
Power Poster
Posts: 410
Joined: Fri Apr 20, 2007 7:26 pm

Re: FormBuilder - Forms Not Working in News Module

Post 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
Post Reply

Return to “Modules/Add-Ons”