For a single record section, I just included an if statement in the body and removed the default "record not found" error in the list code. This allows pages to skip empty record sections without error. It works fine, however, in the past, there was no need for an if statement and no errors appeared. Was there a different default list code? I thought I used to simply add <?php echo $about_usRecord['content']; ?> wherever I needed it on a single record page.
Am I wrong? I guess I must be. It's odd that an error should be thrown from a CMS on a website because a record is empty (no content).
list($about_usRecords, $about_usMetaData) = getRecords(array(
'tableName' => 'about_us',
'where' => '', // load first record
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
$about_usRecord = @$about_usRecords[0]; // get first record
<?php if($about_usRecord):?> // I don't recall this if check being required
<?php echo $about_usRecord['content']; ?>
<?php endif?>