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:
- 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. - 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.
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!
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
It's installed on a hosting account. Code is below
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Forgot password || My site</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="shortcut icon" href="assets/img/favicon.ico">
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.jpg">
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/apple-touch-icon-72x72.jpg">
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/apple-touch-icon-114x114.jpg">
<link rel="stylesheet" type="text/css" href="assets/css/custom-animations.css" />
<link rel="stylesheet" type="text/css" href="assets/css/lib/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
</head>
<body id="landing-page" class="landing-page">
<!-- Preloader -->
<div class="preloader-mask">
<div class="preloader"><div class="spin base_clr_brd"><div class="clip left"><div class="circle"></div></div><div class="gap"><div class="circle"></div></div><div class="clip right"><div class="circle"></div></div></div></div>
</div>
<header>
<nav class="navigation navigation-header relative-header background-header">
<div class="container">
<div class="navigation-brand">
<div class="brand-logo">
<a href="http://www.mysite.com" class="logo"></a><a href="http://www.mysite.com" class="logo logo-alt"></a>
</div>
</div>
<button class="navigation-toggle">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navigation-navbar collapsed">
<ul class="navigation-bar navigation-bar-left noclose">
<li><a href="index.php#about">About</a></li>
<li><a href="index.php#program">Program</a></li>
<li><a href="index.php#testimonials">Testimonials</a></li>
<li><a href="index.php#plans">Plans</a></li>
<li><a href="index.php#footer">Contacts</a></li>
</ul>
<ul class="navigation-bar navigation-bar-right">
<li><a href="login.php">Login</a></li>
<li class="featured"><a class="btn btn-sm btn-outline-color" href="index.php#plans">Join now!</a></li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container-fluid row">
<div class="window-height form-section clearfix">
<div class="container centered-block">
<div class="col-sm-6 col-sm-offset-3">
<div class="heading-block align-center">
<h2><span class="highlight">Forgot</span> password</h2>
<p class="heading-font">Enter your username or email below to reset your password.</p>
</div>
<div class="align-center">
<div class="row">
<form class="form billing-details-form" method="post" action="">
<input type="hidden" name="action" value="sendPasswordReminder" />
<div class="form-group col-sm-12">
<input type="text" name="usernameOrEmail" class="form-control" placeholder="Email or username" value="">
</div>
<div class="form-group col-sm-12">
<input type="submit" name="submit" value="Reset" class="btn btn-solid" />
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<footer id="footer" class="footer light-text">
<div class="container">
<div class="footer-content row">
<div class="col-sm-4 col-xs-12">
<strong class="heading">Customer service</strong>
<a href="faq.php">FAQ</a><br>
<a href="privacypolicy.php">Privacy policy</a><br>
<a href="terms.php">Terms & conditions</a>
</div>
<div class="col-sm-5 social-wrap col-xs-12">
<strong class="heading">Social Networks</strong>
</div>
<div class="col-sm-3 col-xs-12">
<strong class="heading">Our Contacts</strong>
<ul class="list-unstyled">
<li><span class="icon icon-chat-messages-14"></span><a href="mailto:admin@mysite.com”>admin@mysite.com</a></li>
</ul>
</div>
</div>
</div>
<div class="copyright">© My site <script type="text/javascript">
document.write(new Date().getFullYear());
</script>. All rights reserved.</div>
</footer>
<div class="back-to-top"><i class="fa fa-angle-up fa-3x"></i></div>
<!--[if lt IE 9]>
<script type="text/javascript" src="assets/js/jquery-1.11.3.min.js?ver=1"></script>
<![endif]-->
<!--[if (gte IE 9) | (!IE)]><!-->
<script type="text/javascript" src="assets/js/jquery-2.1.4.min.js?ver=1"></script>
<!--<![endif]-->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.plugin.js"></script>
<script type="text/javascript" src="assets/js/startuply.js"></script>
</body>
</html>
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!
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/