8: Undefined index: session_var??

Started by cme1st2302, September 21, 2009, 01:41:33 AM

Previous topic - Next topic

cme1st2302

Dear fellow SMFer's,
   I was doing a check of the Error Log and I have the following error in my log (17 pages worth):

8: Undefined index: session_var
File: /home/content/b/u/c/buc240/html/eastcoastastro/forums/Themes/default/languages/Post.english.php (eval?)
Line: 111

This is the code from line 111 of the Post.english.php file:

$txt['maxAttachPerPost'] = 'per post';

Any ideas how to fix this error? 

Thanks in advance,
Chris

PS - I attached the file as well just in case you need it.
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

tyty1234

The error is not coming from that file. What you want to do is install this mod, disable template eval, and then replicate the error, and then tell us what the new error is.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

SlammedDime

Since it's the post language file, the error is either occuring in index.template.php on line 111 or post.template.php on line 111.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

cme1st2302

Thanks for the replies fellas!!!

@tyty1234 - I will try what you suggested and report back.

But in the mean time.....
@SlammedDime - Here is the code from line 111 from both the files you suggested:

index.template.php (from the overall forum default theme)
<title>', $context['page_title'], '</title>';

Post.template.php
var numErrors = errors.getElementsByTagName("error").length, errorList = new Array();

Thanks,
Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

cme1st2302

@tyty1234 - I did what you said and here is the error I got after:

8: Undefined index: session_var
File: /home/content/b/u/c/buc240/html/eastcoastastro/forums/Themes/default/PortalShoutbox.template.php
Line: 111

I've attached the PortalShoutbox.template.php

Thanks,
Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

SlammedDime

SMF 1.1.x doesn't use session_var, that's a SMF 2.0 thing... so I'd bring it up to the SP people....

However you should be able to fix it by doing the following

Code (Find) Select
' . $context['session_var'] . '

Code (Replace) Select
sesc
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

tyty1234

Quote from: SlammedDime on September 21, 2009, 03:42:27 AM
SMF 1.1.x doesn't use session_var, that's a SMF 2.0 thing... so I'd bring it up to the SP people....

However you should be able to fix it by doing the following

Code (Find) Select
' . $context['session_var'] . '

Code (Replace) Select
sesc
Um...do you mean...

Code (Replace With) Select

' . $sesc . '


;)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

SlammedDime

No, it's not a PHP variable it needs to be replaced with, it's a normal text string, hense just sesc

;)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

tyty1234

Huh, really?

Learned something new today. :)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

SlammedDime

Thx SiNaN...

Looks like it's 'sc', not 'sesc'... I need to go back and review 1.1.x code... :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

[SiNaN]

No problems. ;)

'sc' is used for POST and 'sesc' for GET. That variable is passed to a Js function for AJAX stuff. So it uses POST.
Former SMF Core Developer | My Mods | SimplePortal

tyty1234

Learned and remembered two things today. $_POST['sc'] and $_GET['sesc'].

I have to remember those, thanks SiNAN. :)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

cme1st2302

Ok so i am using the sc then?  I will try this out later when I get home and report back.  Thanks to all of you for helping me out.  I appreciate it!!!

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

cme1st2302

[SiNaN]  I can not find the following code anywhere in the PortalShoutbox.php file

' . $context['session_var'] . '

What should I do?

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

SlammedDime

It's in PortalShoutbox.template.php, the same file that you posted above.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

cme1st2302

Ok I found it was looking in the wrong file duh.  I changed the code and now I will give it a day to see if it shows up in the log again.  Should I re-enable the template eval?

Thanks again for your help!!!
Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Arantor

You can if you want but it doesn't hurt to leave it off.
Holder of controversial views, all of which my own.


cme1st2302

So far no errors in the log.  I will mark this as solved for now but if it comes up again I will re-open it.  Thanks all for your help!!!

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

cme1st2302

Ok fellas that fixed it.  I had a number of users on and there are no erros in the log after 4 hours.  Thanks again for everyone's help!!!

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Advertisement: