News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

8: Undefined index: id_member

Started by extremenewbie, April 02, 2009, 01:17:59 PM

Previous topic - Next topic

extremenewbie

I have been getting this error consistently in my forum, does anyone know what causes this and how to fix it?

8: Undefined index: id_member

Using:
SMF 2.0 RC1
No mods installed

The error comes up using both themes I have installed. 3column Theme and Clean Theme... I dont think it has anything to do with the theme...

Thanks in advance....
"20 Years from now you will be more disappointed by the things you didn't do than by the ones you did"

jeri

Having same problem after changing my forum from 2.0 to 1.1.8

Tyrsson

Can you please post the entire error message.
PM at your own risk, some I answer, if they are interesting, some I ignore.

extremenewbie

Sure thing, now I'm getting more.... (or possibly had them and didn't notice)

8: Undefined index:  Hello_member_ndt
File: /home/content/c/t/u/ctunite/html/forums/Themes/default/MessageIndex.template.php (body_above sub template - eval?)                               Line: 191

[/]
2: Invalid argument supplied for foreach()
File: /home/content/c/t/u/ctunite/html/forums/Themes/3columnCOPYtoedit/BoardIndex.template.php (main sub template - eval?)                               Line: 439                            

[/]
8: Undefined variable: mark_read_button
File: /home/content/c/t/u/ctunite/html/forums/Themes/3columnCOPYtoedit/BoardIndex.template.php (main sub template - eval?)                               Line: 220                            

Thanks Tyrsson!


[/]
"20 Years from now you will be more disappointed by the things you didn't do than by the ones you did"

Tyrsson

Run this and then clear the error log and post the new errors so we can figure out exactly where they are coming from.

To disable template eval via phpMyAdmin ( What is phpMyAdmin? )

REPLACE INTO smf_settings
   (variable, value)
VALUES ('disableTemplateEval', '1');


PM at your own risk, some I answer, if they are interesting, some I ignore.

SoLoGHoST

Just a little info for ya that I picked up along the way about undefined_index errors...

undefined_index usually means that a variable is being called and it is null or empty.  Best practice to get rid of these warnings in your error logs is to check if it is not empty or if it isset and then perform the necessary code.  For example:

if (!empty($Hello_Member_ndt)) {

// Continue on...

}

if (!empty($mark_read_button)) {


}

// OR YOU CAN TRY THIS


if (isset(Hello_Member_ndt)) {
// Continue on...
}

if (isset(mark_read_button)) {
// Continue on...

}

Informatics

Quote from: extremenewbie on April 03, 2009, 07:15:39 PM
Sure thing, now I'm getting more.... (or possibly had them and didn't notice)

8: Undefined index:  Hello_member_ndt
File: /home/content/c/t/u/ctunite/html/forums/Themes/default/MessageIndex.template.php (body_above sub template - eval?)                               Line: 191

[/]
2: Invalid argument supplied for foreach()
File: /home/content/c/t/u/ctunite/html/forums/Themes/3columnCOPYtoedit/BoardIndex.template.php (main sub template - eval?)                               Line: 439                            

[/]
8: Undefined variable: mark_read_button
File: /home/content/c/t/u/ctunite/html/forums/Themes/3columnCOPYtoedit/BoardIndex.template.php (main sub template - eval?)                               Line: 220                            

Thanks Tyrsson!


[/]


I think it's came from Ajax Chat.. like on mine


You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id




Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Tyrsson

That is a default language string. Its found in the index.template.php and is defined in the index.english.php.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Kimmie

I am having an issue with a similar error (while someone was viewing a board):

8: Undefined index: id_member
File: /home//public_html/Sources/Security.php
Line: 227

any ideas?

Just upgraded from 1.9 to 2.0

Mods Installed are:
1.   Generic Avatars   1.1   [ Uninstall ]
2.   Justify BBCode   2.1   [ Uninstall ]
3.   New Topic Button   1.0   [ Uninstall ]
4.   New Style Message Icon   1.1   [ Uninstall ]
5.   Aeva ~ Auto-Embed Video & Audio   6.9.100   [ Uninstall ]
6.   Global Headers Footers   2.0   [ Uninstall ]
7.   Thank-O-Matic   2.0 Beta 10   [ Uninstall ]
8.   Hide Tag BBC Image   1.0.1   [ Uninstall ]
9.   Hide Tag   2.3.5   [ Uninstall ]
10.   Users Online Today   1.5.4

N3RVE

Attach ./Sources/security.php

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Kimmie


greyknight17

Kimmie, is this issue resolved now?

Is this error only showing up when members view a board? Clear your error log and test it out to see what's triggering it.

Did you make any changes prior to this problem? Do you remember the last mod you installed? Try uninstalling the Thank-O-Matic mod to see if it helps.

Kimmie

Honestly, I had totally forgotten about this issue, and I am assuming its because I havent seen that error since then and/or because I hadnt had a response since i uploaded that file for [n3rve]

Give me a couple of days (will be busy with family/holiday tomorrow) and I will check on this and close the thread if necessary :)

Arantor

Are you still having trouble with this, or is it resolved now?

Kimmie

I havent had the error again so I am gonna assume its fine and will mark solved. :)

Arantor

extremenewbie, is this still an issue?

rosspet

#16
I'm getting this error as well with SMF 2.0 RC1.2 . I cleared the error log, went to the home page then back to the error log and found:-
   
8: Undefined index: id_member

File: /home/sapasor1/public_html/Themes/default/GenericMenu.template.php (body_above sub template - eval?)
Line: 240
..................................................
8: Undefined index: id_member
File: /home/sapasor1/public_html/Themes/default/GenericMenu.template.php (body_above sub template - eval?)
Line: 239
..................................................
8: Undefined index: id_member
File: /home/sapasor1/public_html/Themes/clean/BoardIndex.template.php (body_above sub template - eval?)
Line: 240
.................................................
8: Undefined index: id_member
File: /home/sapasor1/public_html/Themes/clean/BoardIndex.template.php (body_above sub template - eval?)
Line: 239
..................................................
8: Undefined index: id_member
File: /home/sapasor1/public_html/Themes/default/Errors.template.php (body_above sub template - eval?)
Line: 240
.................................................
8: Undefined index: id_member
File: /home/sapasor1/public_html/Themes/default/Errors.template.php (body_above sub template - eval?)
Line: 239
...............................................

Cleared log, went to moderate then back to log. Six errors, 2 being the same Errors.template.php ones, 2 the same GenericMenu.template.php, and 2 new ones, both Themes/default/ModerationCenter.template.php (body_above sub template - eval?)
Line: 240 and line 239
..................................................

Any ideas please?

Arantor


rosspet

1.     PortaMx v0.961     0.961
2.    EmailValidator    1.0

Arantor

Hmmm.

The problem is that it's not very clear where the errors are. The "eval" part is actually masking where the real error is.

Can you install Disable Template Eval, then tick the box it gives you. This will change the errors so we can see exactly where they are.

Advertisement: