Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: davef on June 07, 2005, 09:23:19 PM

Title: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: davef on June 07, 2005, 09:23:19 PM
I get 7 or 8 pages a day of this error in my error logs.  (8: Undefined index: icon)

  Does anyone know what this is and how I can fix it?

Thanks.
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: [Unknown] on June 07, 2005, 09:59:33 PM
What line does it say it's on?

Are all your templates and files up to date?

Are you using any custom theme?

-[Unknown]
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: davef on June 07, 2005, 10:33:15 PM
file:  Source/post.php
line:  sometimes 490, sometimes 1180
theme:  Themis

Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: [Unknown] on June 07, 2005, 11:31:35 PM
Have you modified your templates in any way, perhaps to remove message icons?

-[Unknown]
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: davef on June 09, 2005, 08:07:49 AM
Yes, we did.  So if we don't want message icons, we have to deal with 100's of error messages in the logs? 
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: bloc on June 09, 2005, 08:48:36 AM
What did you remove..and where? In the template files or in the Sources files?

Generally you should be able to get around these new errors, but you need to show what you removed. I am guessing you removed something that the theme expects..so the theme needs to to adjusted too.
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: Gary on June 09, 2005, 09:06:52 AM
I get it several times in my logs too:

8: Undefined index: warning
File: /****/****/****/forum/Sources/Load.php
Line: 675
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: Grudge on June 09, 2005, 09:10:03 AM
davef,

Of course not, but if you don't want something you have to remove it cleanly :)

I expect you removed it from Post.template.php, but just removed the SELECT box code. As the script expects some form of message icon you can do so by turning the SELECT box into a hidden element. So where you removed the drop down you should put:


<input type="hidden" name="icon" value="xx" />


Generally, if you ever want to remove an element of a form you should make it a hidden element and not just yank it out :) (Or if you do yank it out do the same thing with the Source code that handles the element)
Title: Re: I Get Error Hundreds of Times: 8: Undefined index: icon
Post by: davef on June 09, 2005, 09:26:36 AM
thanks grudge!