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.
The error is not coming from that file. What you want to do is install this mod (http://custom.simplemachines.org/mods/index.php?mod=2054), disable template eval, and then replicate the error, and then tell us what the new error is.
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.
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
@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 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
' . $context['session_var'] . '
sesc
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
' . $context['session_var'] . '
sesc
Um...do you mean...
' . $sesc . '
;)
No, it's not a PHP variable it needs to be replaced with, it's a normal text string, hense just sesc
;)
Huh, really?
Learned something new today. :)
This was reported sometime ago, here: ;)
http://simpleportal.net/index.php?topic=3201.0
Thx SiNaN...
Looks like it's 'sc', not 'sesc'... I need to go back and review 1.1.x code... :)
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.
Learned and remembered two things today. $_POST['sc'] and $_GET['sesc'].
I have to remember those, thanks SiNAN. :)
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
[SiNaN] I can not find the following code anywhere in the PortalShoutbox.php file
' . $context['session_var'] . '
What should I do?
Chris
It's in PortalShoutbox.template.php, the same file that you posted above.
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
You can if you want but it doesn't hurt to leave it off.
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
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