SimplePortal

Support => English Support => Topic started by: Aw06 on November 03, 2008, 08:51:04 PM

Title: 8: Undefined index: color
Post by: Aw06 on November 03, 2008, 08:51:04 PM
Getting this error in error logs .. it seems to be recent ...

Code: [Select]
8: Undefined index: color
File: /home/adrianw/public_html/forum/Themes/default/SPortal.template.php (eval?)
Line: 468

SP 2.0.4
SMF 1.1.6

Any ideas ?

can i just go delete line 468?
Title: Re: 8: Undefined index: color
Post by: Jade Elizabeth on November 03, 2008, 11:21:37 PM
/me passes out

An undefined index?

Well, that's an eval error:
Quote
At times of debugging, errors come from files do not contain the said error in your Forum Error Log. This is caused by eval().

eval() is a PHP command that evaluates a string as PHP code. Since file_get_contents() (a function that is similar to file(), except that it returns the file in a string) returns the contents of a file as a string, SMF is granted accesability to pin down the specific syntax that is causing a parse error, and consequently outputs an error message showing you the code that is producing the problem.

eval() by default is turned on. The downside to that is PHP does not know where an undefined error occurred as the entire file was allocated as a string. By switching eval() off, SMF uses require() (or, more often, require_once()) to get the template file. This in turn lets PHP report the exact location of the error.

To disable eval(), open phpMyAdmin (refer to: What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0)) and click the SQL tab and use the following query:

Code: [Select]
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);
By disabling eval(), the errors that have already occurred need to be propagated once again. The new errors that have appeared in the error log contain the correct file that PHP had a problem with.

To reactivate eval(), use the following query:

Code: [Select]
DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';

This is what we call live testing Help Squad docs  >:-D
Title: Re: 8: Undefined index: color
Post by: ???1031 on November 04, 2008, 12:43:20 AM
Getting this error in error logs .. it seems to be recent ...

Code: [Select]
8: Undefined index: color
File: /home/adrianw/public_html/forum/Themes/default/SPortal.template.php (eval?)
Line: 468

SP 2.0.4
SMF 1.1.6

Any ideas ?

can i just go delete line 468?
Good Luck to find that line ;).

Did this error only appear once? Or did it appear from time to time? :)

Bye
DIN1031
Title: Re: 8: Undefined index: color
Post by: asude on November 04, 2008, 04:52:38 AM
by default, SimplePortal does not include a 'color' index in its codes. it would be better if you paste here the codes you use in your custom PHP blocks.
Title: Re: 8: Undefined index: color
Post by: Aw06 on November 04, 2008, 08:20:21 AM
Good Luck to find that line ;).

Did this error only appear once? Or did it appear from time to time? :)

Bye
DIN1031

Happening since im running a php calender block, happens everytime someone looks at the portal

by default, SimplePortal does not include a 'color' index in its codes. it would be better if you paste here the codes you use in your custom PHP blocks.

hmmm, i think you right .. im running a calender php block ...

i cant post the code as its over the 2000 charactor limit ... but you can see the code im using HERE (http://www.tinyportal.net/index.php?PHPSESSID=4b256fb55d0a34bb21246a7d1ddcd900&topic=700.msg209073#msg209073)

Title: Re: 8: Undefined index: color
Post by: asude on November 04, 2008, 10:28:51 AM
site is being moved to another server from what i see. check the calendar block here (http://simpleportal.net/index.php?topic=89.msg4384#msg4384). i believe they are the same, but the one here is fixed.
Title: Re: 8: Undefined index: color
Post by: Jade Elizabeth on November 04, 2008, 11:33:19 AM
Why are you using TinyPortal code?
Title: Re: 8: Undefined index: color
Post by: asude on November 04, 2008, 11:38:22 AM
it is just php codes. php block codes will work for everything that parses php.
Title: Re: 8: Undefined index: color
Post by: Aw06 on November 04, 2008, 01:03:28 PM
site is being moved to another server from what i see. check the calendar block here (http://simpleportal.net/index.php?topic=89.msg4384#msg4384). i believe they are the same, but the one here is fixed.

ok thanks, works , will watch to see if errors go away .. gonna also post for help as i need the calender to show events and holidays as well

edit ........

error logs clean once again ..
Title: Re: 8: Undefined index: color
Post by: [SiNaN] on November 10, 2008, 06:45:24 AM
Last update for this? Should we mark this as solved?
Title: Re: 8: Undefined index: color
Post by: Aw06 on November 10, 2008, 10:04:06 AM
Last update for this? Should we mark this as solved?

yeah, pretty much solved
SimplePortal 2.3.8 © 2008-2024, SimplePortal