Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: dillon - kesäkuu 02, 2011, 06:35:24 IP

Otsikko: Issue with the log error table
Kirjoitti: dillon - kesäkuu 02, 2011, 06:35:24 IP
My error table keeps getting this error.
The main issue is with the 'contact'  as described in this error. Every time someone hits the theme it tosses up the error.

Error:
8: Use of undefined constant contact - assumed 'contact'<br />File: /home4/miltonmi/public_html/miltonmoms/SMFMil/Themes/dilbermc/index.template.php<br />Line: 1351

eval has been turned off and I am running on 1.1.13.
Otsikko: Re: Issue with the log error table
Kirjoitti: mashby - kesäkuu 02, 2011, 09:11:30 IP
Mind providing a list of installed mods and more importantly the 10 lines above and below line 1351 in that file?
Otsikko: Re: Issue with the log error table
Kirjoitti: dillon - kesäkuu 02, 2011, 09:51:41 IP
Here is the file.
Thank you for your help.
Otsikko: Re: Issue with the log error table
Kirjoitti: mashby - kesäkuu 02, 2011, 10:05:51 IP
OK, this is indeed line 1351:
<a href="http://www.miltonmoms.net/contactforum/">' , $txt[contact] , '</a>
Does that happen on any theme, or is this Contact button only available on the Dilber MC theme? What mod is making that button or was it manually inserted? In any case, in Themes/default/languages/index.english.php you can simply add a line to that to make it a valid string, something like this:
$txt['contact'] = 'Contact Us';You can, of course, make Contact Us however you want the string to appear. Insert that at the end above ?> or somewhere as a new line in that file. I think that will help, but not entirely sure. It's worth a shot anyway. Just odd that Contact Us is already appearing on your site though.
Otsikko: Re: Issue with the log error table
Kirjoitti: dillon - kesäkuu 02, 2011, 10:46:27 IP
The errors are still present:
8: Use of undefined constant contact - assumed 'contact'<br />File: /home4/miltonmi/public_html/miltonmoms/SMFMil/Themes/dilbermc/index.template.php<br />Line: 1351

The code was placed in the file path that was suggested. I have attached the file. The code was placed at line 707 Please let them know that code is already on line 15.
Otsikko: Re: Issue with the log error table
Kirjoitti: mashby - kesäkuu 02, 2011, 10:49:22 IP
Ah, I see now what's up! Try the attached.
Line 15 was:
$txt[contact] = 'Contact Us';

And is now:
$txt['contact'] = 'Contact Us';
I also removed line 707.
Those ' characters are important. :)
Otsikko: Re: Issue with the log error table
Kirjoitti: dillon - kesäkuu 03, 2011, 08:14:40 AP
It is still creating errors, I have attached the altered file.

Otsikko: Re: Issue with the log error table
Kirjoitti: Arantor - kesäkuu 03, 2011, 08:28:33 AP
<a href="http://www.miltonmoms.net/contactforum/">' , $txt['contact'] , '</a>

Note the added ' s
Otsikko: Re: Issue with the log error table
Kirjoitti: dillon - kesäkuu 03, 2011, 10:32:38 AP
Thank you so much for your help.
The error is fixed using the last post as guidance.   However there is another error that is being caused whenever someone looks at a post.

This is the error:
8: Undefined variable: spamclause<br />File: /home4/miltonmi/public_html/miltonmoms/SMFMil/Sources/Display.php<br />Line: 745

Attached is the file.
Otsikko: Re: Issue with the log error table
Kirjoitti: Aleksi "Lex" Kilpinen - kesäkuu 14, 2011, 10:36:56 AP
What mods do you have installed?