Log full of PHP Notices from Formbuilder

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
geotek
Forum Members
Forum Members
Posts: 14
Joined: Wed Apr 22, 2015 3:16 pm

Log full of PHP Notices from Formbuilder

Post by geotek »

Formbuilder is filling the Apache error log with messages like

Code: Select all

PHP Notice:  Undefined index: captcha_error in /.../tmp/templates_c/FormBuilder^7ec2b3a993f08d0d52f67e4c5cfd6fb41d6e518e.module_db_tpl.FormBuilder;fb_3.php on line 113
PHP Notice:  Trying to get property of non-object in /.../tmp/templates_c/FormBuilder^7ec2b3a993f08d0d52f67e4c5cfd6fb41d6e518e.module_db_tpl.FormBuilder;fb_3.php on line 113
I am not using Captchas and Formbuilder is working as expected but these error messages are annoying because they fill up the logs so that more important errors may pass unnoticed.

Any ideas?

CMSMS V.2.1.0
Formbuilder V.0.8.1.2
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: Log full of PHP Notices from Formbuilder

Post by Jo Morg »

I would venture saying that the module has been updated a few times on that installation and the templates haven't been updated accordingly. IIRC we have updated the default sample templates with a different call to Captcha and related Smarty variables for FB templates. The fix is simple: just search in your FB template for the offending variable and either remove the related code or check if the variable is set before that block of code. Something like:

Code: Select all

{if isset($captcha_error)}
  {* the template code block that uses {$captcha_error}... *}
{/if}
"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!
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Log full of PHP Notices from Formbuilder

Post by JamesT »

I saw something similar to what the OP saw when I was testing CMSMS with PHP 7.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Log full of PHP Notices from Formbuilder

Post by JamesT »

I've just had a look at my default FB templates. If I'm not mistaken there are three built in templates:

Default Template
Table Template Titles on left
Table Template Titles on top

Only the first template has {if isset($captcha_error)} - the other two templates use $captcha_error without isset.
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Log full of PHP Notices from Formbuilder

Post by JamesT »

On a related note, every time I load the admin interface of Form Builder 0.8.1.2 using PHP 7, I get these PHP errors:

Code: Select all

[29-Dec-2015 18:35:37 Europe/London] PHP Notice:  Undefined index: title_relaxed_email_regex in /var/sites/m/xxxxx.co.uk/public_html/tmp/templates_c/FormBuilder^675f4336c1c1d65e2939016b28258e133bd0192c.module_file_tpl.FormBuilder;AdminMain2.tpl.php on line 183
[29-Dec-2015 18:35:37 Europe/London] PHP Notice:  Trying to get property of non-object in /var/sites/m/xxxxx.co.uk/public_html/tmp/templates_c/FormBuilder^675f4336c1c1d65e2939016b28258e133bd0192c.module_file_tpl.FormBuilder;AdminMain2.tpl.php on line 183
[29-Dec-2015 18:35:37 Europe/London] PHP Notice:  Undefined index: input_relaxed_email_regex in /var/sites/m/xxxxx.co.uk/public_html/tmp/templates_c/FormBuilder^675f4336c1c1d65e2939016b28258e133bd0192c.module_file_tpl.FormBuilder;AdminMain2.tpl.php on line 185
[29-Dec-2015 18:35:37 Europe/London] PHP Notice:  Trying to get property of non-object in /var/sites/m/xxxxx.co.uk/public_html/tmp/templates_c/FormBuilder^675f4336c1c1d65e2939016b28258e133bd0192c.module_file_tpl.FormBuilder;AdminMain2.tpl.php on line 185
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Log full of PHP Notices from Formbuilder

Post by Rolf »

@JamesT These are fixed in SVN and will be shipped in the next release of FB

Until then you can suppress the errors by adding to the config.php file:

Code: Select all

error_reporting(E_ERROR & ~E_DEPRECATED & ~E_NOTICE);
(if your host allows it...)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Log full of PHP Notices from Formbuilder

Post by JamesT »

Ok, thank you.
Post Reply

Return to “Modules/Add-Ons”