Loads of errors in developer log

8 posts by 2 authors in: Forums > CMS Builder
Last Post: April 11, 2016   (RSS)

I haven't used CMSB since the developer log was implemented. Is it normal to have a load of errors in there for stuff like the below when everything appears to display and function correctly??

E_WARNING: Invalid argument supplied for foreach()
E_NOTICE: Undefined variable: workRecords

By Damon - February 18, 2016 - edited: April 11, 2016

Hi,

Sometimes errors aren't visible so the page looks correct.

Two types of common errors:

  1. Mistyped or incorrect name in foreach loop or variable.  
    example: <?php echo ($record['location']) ?> when it should have been <?php echo ($eventRecord['location']) ?> or vice versa.
  2. The variable is left empty so it doesn't exist and generates an error. 
    Example: you have a field for an event listing called location. But for one listing, the location field is left empty. This code will then generate an error 
    <?php echo ($record['location']) ?>
    so to prevent an error when the field is sometimes left blank, use the @ to suppress the error
    <?php echo (@$record['location']) ?>

We created PHP Error Alert (a Chrome browser plugin), that helps tracking down issues. It will popup a yellow box and list any errors and the line number they occur on.

Chrome Store link: https://chrome.google.com/webstore/detail/php-error-alert/pkckpaaolokjkclbambhmcokaahignkc

It is a good idea to correct errors as you discover them, even if it doesn't effect the display.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

I have installed the plugin and am using it to go through and find all the errors being generated.

There is one on the forgotpassword.php page that is not generating an alert in the plugin. The page appears to work as it should, however when it's used the below error appears in the log:

E_USER_NOTICE: Connection to localhost:25 Timed Out
/home/mysite/public_html/cms/lib/common.php (line 1335)
http://mywebsite.com/forgotpassword.php

By Damon - April 11, 2016

Hi,

Is CMS Builder installed on your local computer (using WAMP, etc) or is it installed on a hosting account?

Can you post the code or attach the code for forgotpassword.php?

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

The exact same error (with no bugs showing with the add on) is happening on one other page on the site too

By Damon - April 11, 2016

Hi,

I'm going to need to take a closer look to determine what is happening. Can you send in Support Request with CMS Builder login and FTP

Can you send in Support Request with CMS Builder login and FTP details?
https://www.interactivetools.com/support/email_support_form.php?priority=free&message=?Loads-of-errors-in-developer-log-80423

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

I've submitted that now. Thanks for your help!