SMF Support > SMF 1.1.x Support

8: Undefined index: icon

(1/2) > >>

sharks:
8: Undefined index: icon
File: /home/user/public_html/forum/Sources/Post.php
Line: 1625

Hello,

I've been getting many pages of of that same error in my Error Log. I'm using SMF 1.1.16.
I have been doing a lot of work on the message icons on my forums, which involves adding new ones and customizing them, and eventually removing them or replacing then, since a few years now. I am quite sure that these errors are directly related to some missing message icons which i have removed from the directories, but which my members have previously selected, or something like that. I'm not 100% sure of what might be causing this problem, but i am resolute in finding the problem and fixing it once and for all!

Here is my idea:
I have been thinking that if i can find the database table where all the message icons information is stored (names, etc), then i can easily identify which names are no longer used and delete or better yet, replace them. That should stop all these missing icon errors, right?

I could really use some expert SMF help here. I know it can't be too difficult to figure out a solution to this simple problem, but i don't know where exactly to look in my database. I could then run a query to replace all those faulty message icons from my database.


UPDATE: OK, i found the table. It's "SMF_messages" and the column is "icon".
I don't know anything about programming, so i would really appreciate some help here. I need a query that would search all the entries in the "icon" column for any blank entries and then replace them with "xx" (which is the default message icon).
I also need a similar query to search for any entries in the "icon" that contain any keywords other than my current list of message icons used on my forums. So, i can then find any message icons with wrong (not blank) codes, and replace them with "xx" (default message icon).

Colin:

--- Code: ---UPDATE smf_messages SET icon = 'xx' WHERE icon = ''
--- End code ---

For the second one I will need the list of keywords and I can write that in PHP for you.

sharks:
Hi Colin

Here is the list of keywords from the filename column of the "smf_message_icons" table: xx, mz, sl, tt, hm, cr, question, exclamation, lamp, thumbup, thumbdown.

Thank you for your help. :)

Colin:
Alright here you go. Edit the file and update your database connection information. Enjoy.

Regards,
-Colin

sharks:
Thanks a lot, Colin. I've been eagerly waiting for your response. I'll run your php file right away.

Navigation

[0] Message Index

[#] Next page

Go to full version