Index error line 304

Started by T3CHN0, June 26, 2016, 07:29:58 AM

Previous topic - Next topic

T3CHN0

Hello
Any help please.
I have one error but don't understand the code to know what's wrong.
Line 304==> &raquo; '.$txt['you_have'].' <b>'.$user_info['posts'].'</b> '.$txt[21].'<br />   

8: Undefined offset: 21


Thank you

I noticed 1 member not approved so I approved him and error stopped.
looks like the number 21 or any other number I put in there is the problem but if I leave no number
the forum stops. So for now I have to leave it the way it is
but any help to correct the error will be good. [not urgent]
Cheers

Kindred

Text string 21 does not exist
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

T3CHN0


Illori

since you have not provided many details we can guess you are using an SMF 1.1.* theme or mod since those use text strings that are numbers. most likely those dont work on SMF 2.0 and should be uninstalled or removed.

T3CHN0

Hello,
Forum url is on my profile.
I use SMF 2.0.11 and have about 20 mods installed.
The error has gone now, something to do with members not approved is doing it.

What details would be more helpful?

I guess your saying I can change this
Line 304==> &raquo; '.$txt['you_have'].' <b>'.$user_info['posts'].'</b> '.$txt[21].'<br />   
to this
Line 304==> &raquo; '.$txt['you_have'].' <b>'.$user_info['posts'].'</b> ''<br />   
and it will be fine.

Cheers

Grammy

My first test site was 1.1.11.  There was $txt[21] in those files, at least in the BoardIndex.template.php.

Did you maybe upgrade from 1.X.X to 2.0.11?  Maybe it's leftover from an old mod?   :-\

T3CHN0

Hi
No the forum is a clean install of 2.0.10 updated to 2.0.11 and about 20 modes installed

Grammy

#7
Quote from: T3CHN0 on June 27, 2016, 01:26:56 AM
Hi
No the forum is a clean install of 2.0.10 updated to 2.0.11 and about 20 modes installed

I guess I meant that maybe one of the mods you installed was actually not the zip for 2.0.X, but for the 1.X version.  The only other $txt[21] strings I've seen, other than the ones found in 1.X.X are some I've seen in custom themes or bits of code where someone is trying to make something responsive.  (But I humbly admit that I don't know much about it.  I just ghost around here reading manuals and support threads.)   :)


Edit:  In Admin--->Server Settings, do you have Disable Evaluation of Templates checked?  If not, you might check it and take another look at your errors to see exactly which file contains the string.   (Your screenshot does say index.php but that string doesn't appear in index.php, even in 1.x, so changing that setting might help narrow it down.) 

T3CHN0

OK I do use a custom theme called Blu 2.0.2
Next time the error happens I will test & see if the error happen on SMF default them.
Cheers

Grammy

That theme doesn't place the $txt[21] string, so a mod is probably the culprit, since you say that your forum began as 2.0.10.  Well, if you didn't have Disable Evaluation of Templates checked in your settings before and do now, then it may help you zero in on exactly which file has the string in it.  (I guess there might also be some left over database table thing going on, but you don't need me guessing, ha!)   :)

T3CHN0

I like your comment Grammy and help.
Pity there is no like button I could click on to let you know I liked your comment :)

Well what ever the mod it has to have something to do with security with new members.
I use firewall, bad-behavior. I will do as you said & Disable Evaluation of Templates next time.
TY

Advertisement: