Errors in error log.
Posted: Tue Nov 05, 2019 12:06 pm
Hi,
my error log is growing rapidly, due to three errors produced by every single page call. These are the errors:
[12:31:57] PHP Notice: Deprecated usage of CGExtensions::find_layout_template in /modules/CGExtensions/CGExtensions.module.php on line 2109
[12:31:57] PHP Warning: Illegal offset type in /tmp/templates_c/^74fe5d651b7111050b07feffaf4850925a346d22_0.cms_template.dropdownmenu.php on line 87
[12:31:57] PHP Warning: Illegal offset type in /tmp/templates_c/^74fe5d651b7111050b07feffaf4850925a346d22_0.cms_template.dropdownmenu.php on line 93
The first doesnt give me a clue what to do, the other two seem to be produced (multiple times per page, sometimes 6 sometimes 8 ) by a menu template. Now, these line numbers don't exist in the template, which makes it more complex to understand. This is the code of the template:
{if !isset($depth)}{$depth=0}{/if}
{strip}
<ul id="menu" class="clearfix" style="padding-left:0px;">
{$depth=$depth+1}
{foreach $nodes as $node}
{* setup classes for the anchor and list item *}
{$liclass=[]}
{$aclass=[]}
{* the first child gets a special class *}
{if $node@first && $node@total > 1}{$liclass[]='first_child'}{/if}
{* the last child gets a special class *}
{if $node@last && $node@total > 1}{$liclass[]='last_child'}{/if}
{if $node->current}
{* this is the current page *}
{$liclass[]='current'}
{$aclass[]='current'}
{/if}
{if $node->has_children}
{* this is a parent page *}
{$liclass[]='menuitem submenuheader'}
{$aclass[]='menuitem submenuheader'}
{$liclass[$node->children]='item no-sub'}
{$aclass[$node->children]='item no-sub'}
{/if}
{if $node->parent}
{* this is a parent of the current page *}
{$liclass[]='current'}
{$aclass[]='current'}
{/if}
{* build the menu item from the node *}
{if $node->type == 'sectionheader'}
<li class='{implode(' ',$liclass)}'><a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if}><span class="sectionheader">{$node->menutext}</span></a>
{if isset($node->children)}
{include file=$smarty.template nodes=$node->children}
{/if}
</li>
{else if $node->type == 'separator'}
<li style="list-style-type: none;"><hr class="menu_separator"/></li>
{else}
{* regular item *}
<li class="{implode(' ',$liclass)}">
<a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if} href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>
{if isset($node->children)}
<div class="submenu clearfix">
{include file=$smarty.template nodes=$node->children}
</div>
{/if}
</li>
{/if}
{/foreach}
{$depth=$depth-1}
</ul>
{if $depth == 0}
<div class="clearb"></div>
{/if}
{/strip}
<select onchange="window.location = this.value">
<option value="">Select</option>
{foreach $nodes as $node}
<option value="{$node->url}">{$node->menutext}</option>
{/foreach}
</select>
The menu works ok, and the site is not giving any error messages, just came across this enormous errorlog all the sudden, hopefully someone sees what can be done here to solve this.
my error log is growing rapidly, due to three errors produced by every single page call. These are the errors:
[12:31:57] PHP Notice: Deprecated usage of CGExtensions::find_layout_template in /modules/CGExtensions/CGExtensions.module.php on line 2109
[12:31:57] PHP Warning: Illegal offset type in /tmp/templates_c/^74fe5d651b7111050b07feffaf4850925a346d22_0.cms_template.dropdownmenu.php on line 87
[12:31:57] PHP Warning: Illegal offset type in /tmp/templates_c/^74fe5d651b7111050b07feffaf4850925a346d22_0.cms_template.dropdownmenu.php on line 93
The first doesnt give me a clue what to do, the other two seem to be produced (multiple times per page, sometimes 6 sometimes 8 ) by a menu template. Now, these line numbers don't exist in the template, which makes it more complex to understand. This is the code of the template:
{if !isset($depth)}{$depth=0}{/if}
{strip}
<ul id="menu" class="clearfix" style="padding-left:0px;">
{$depth=$depth+1}
{foreach $nodes as $node}
{* setup classes for the anchor and list item *}
{$liclass=[]}
{$aclass=[]}
{* the first child gets a special class *}
{if $node@first && $node@total > 1}{$liclass[]='first_child'}{/if}
{* the last child gets a special class *}
{if $node@last && $node@total > 1}{$liclass[]='last_child'}{/if}
{if $node->current}
{* this is the current page *}
{$liclass[]='current'}
{$aclass[]='current'}
{/if}
{if $node->has_children}
{* this is a parent page *}
{$liclass[]='menuitem submenuheader'}
{$aclass[]='menuitem submenuheader'}
{$liclass[$node->children]='item no-sub'}
{$aclass[$node->children]='item no-sub'}
{/if}
{if $node->parent}
{* this is a parent of the current page *}
{$liclass[]='current'}
{$aclass[]='current'}
{/if}
{* build the menu item from the node *}
{if $node->type == 'sectionheader'}
<li class='{implode(' ',$liclass)}'><a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if}><span class="sectionheader">{$node->menutext}</span></a>
{if isset($node->children)}
{include file=$smarty.template nodes=$node->children}
{/if}
</li>
{else if $node->type == 'separator'}
<li style="list-style-type: none;"><hr class="menu_separator"/></li>
{else}
{* regular item *}
<li class="{implode(' ',$liclass)}">
<a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if} href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>
{if isset($node->children)}
<div class="submenu clearfix">
{include file=$smarty.template nodes=$node->children}
</div>
{/if}
</li>
{/if}
{/foreach}
{$depth=$depth-1}
</ul>
{if $depth == 0}
<div class="clearb"></div>
{/if}
{/strip}
<select onchange="window.location = this.value">
<option value="">Select</option>
{foreach $nodes as $node}
<option value="{$node->url}">{$node->menutext}</option>
{/foreach}
</select>
The menu works ok, and the site is not giving any error messages, just came across this enormous errorlog all the sudden, hopefully someone sees what can be done here to solve this.