Error with CMSB in WordPress
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 13, 2012 (RSS)
By eduran582 - August 11, 2012
Hi all,
I have CMSB installed with the latest WordPress version (with the "Exec-PHP" plugin.) When ever I put just the generated "top" code on a page:
I get the following 'notice' at the bottom of the WordPress page:
"Notice: Undefined index: none in /home/.../wp-content/themes/itheme2/footer.php on line 16 Warning: Invalid argument supplied for foreach() in /home/.../html/wp-content/themes/itheme2/footer.php on line 16"
I've tracked it down to the third line, "foreach ($dirsToCheck...", and when I comment out that line, the error does not appear (and of course, the program halts.) Knowing where the cmsAdmin dir is located, I also tried replacing the code using:
but that didn't make any difference and the error still appeared.
FYI, when the code is executed, it displays fine (list pages, detail pages, etc.) but still shows the 'Notice' at the bottom.
The area the 'Notice' refers to in the 'footer.php' page is:
(with 'line 16 being the first line.)
Any suggestions to try to get rid of that notice?
TIA,
Eric
I have CMSB installed with the latest WordPress version (with the "Exec-PHP" plugin.) When ever I put just the generated "top" code on a page:
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('<abs path>','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
I get the following 'notice' at the bottom of the WordPress page:
"Notice: Undefined index: none in /home/.../wp-content/themes/itheme2/footer.php on line 16 Warning: Invalid argument supplied for foreach() in /home/.../html/wp-content/themes/itheme2/footer.php on line 16"
I've tracked it down to the third line, "foreach ($dirsToCheck...", and when I comment out that line, the error does not appear (and of course, the program halts.) Knowing where the cmsAdmin dir is located, I also tried replacing the code using:
require_once "/home/.../html/cmsAdmin/lib/viewer_functions.php";
but that didn't make any difference and the error still appeared.
FYI, when the code is executed, it displays fine (list pages, detail pages, etc.) but still shows the 'Notice' at the bottom.
The area the 'Notice' refers to in the 'footer.php' page is:
<?php foreach($columns[$footer_widget_option] as $col): ?>
<?php
$x++;
if($x == 1){
$class = "first";
} else {
$class = "";
}
?>
<div class="<?php echo $col;?> <?php echo $class; ?>">
<?php if (@!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer_Widget_'.$x) ) ?>
</div>
<?php endforeach; ?>
(with 'line 16 being the first line.)
Any suggestions to try to get rid of that notice?
TIA,
Eric
Re: [eduran582] Error with CMSB in WordPress
By Jason - August 13, 2012
Hi,
From the look of your error, I would check the value of $footer_widget_option, as this is what's being used as the index in $columns. Where is this variable being set?
Hope this helps
From the look of your error, I would check the value of $footer_widget_option, as this is what's being used as the index in $columns. Where is this variable being set?
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/