Errors in error log.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
vhaakman
Forum Members
Forum Members
Posts: 35
Joined: Fri Oct 05, 2012 7:59 am

Errors in error log.

Post by vhaakman »

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.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Errors in error log.

Post by DIGI3 »

What PHP version? If it's 7.2, try rolling back to 7.1 - we're not quite at full 7.2 support yet.

For your live site, it may be best to suppress warnings and notices from the log. Those are handy to have during development, so just enable them on your development site.
Not getting the answer you need? CMSMS support options
vhaakman
Forum Members
Forum Members
Posts: 35
Joined: Fri Oct 05, 2012 7:59 am

Re: Errors in error log.

Post by vhaakman »

Thanks!

I tried going back to 7.1, but that generates the same errors.
I set the php.ini to suppress these warnings, and it's gone. Thanks.

Ah, I'd like to change the titel to [solved], but the edit button is missing...
Locked

Return to “Modules/Add-Ons”