4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 28, 2017   (RSS)

Hi ,

I posted our site link on Facebook.   Got error below : 

Notice: Undefined variable: about_usRecord in /home2/unicomp/public_html/newsDetail.php on line 49

Screenshot :


Here is our code:

<?php header('Content-type: text/html; charset=utf-8'); ?>
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */

// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home2/ehost7/public_html/unicomp.com.tw/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load record from 'news'
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'where' => whereRecordNumberInUrl(0),
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
$newsRecord = @$newsRecords[0]; // get first record
if (!$newsRecord) { dieWith404("Record not found!"); } // show error message if no record found


It only on cmsBuilder site.   

Hope you can help,


Hi jh, 

Can you try going to the URL directly, viewing-source in your browser, and searching for "undefined"?  Make sure there isn't a hidden error in the page first.

Let me know what you find!

Dave Edis - Senior Developer

Hi Dave

YES!  Here:


There are two "Undefined variable" on this page : 

<meta name="Description" content="
Notice: Undefined variable: about_usRecord in /home2/unicomp/public_html/newsDetail.php on line 49" /><meta name="Keywords" content="
Notice: Undefined variable: about_usRecord in /home2/unicomp/public_html/newsDetail.php on line 50" />

The page here : 


What can I do for fixing this page??

Thank you!