Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: spikeweb on July 06, 2015, 04:04:49 AM

Title: 8: Undefined index: subject
Post by: spikeweb on July 06, 2015, 04:04:49 AM
I have this error message 8: Undefined index: subject in thousands of error logs from the migration to 2.0x.

The full message is :

myforum.com/index.php?action=post;topic=TOPIC_ID;last_msg=MSG_ID
8: Undefined index: subject
File: /PATH-TO-FORUM/public_html/Themes/default/Login.template.php (body_above sub template - eval?)
Ligne: 530

I tried to look at the code but I am not able to find out what is the source of the message.
The template used is Redsy, downloaded from SMF site.

Installed packages are :
1.     SEO Sitemap   2.2.1
2.   SMF Gallery Pro Profile Link   1.1
3.   Ad Managment   3.2
4.   SMF Gallery Pro   7.0.3
5.   Stop Spammer   2.3.9
6.   RSS Feed Icon   1.1
7.   SMF Gallery Pro Recent Profile Images

The Forum URL is http://forum.nikonpassion.com

Thanks for any help ...

JC
Title: Re: 8: Undefined index: subject
Post by: Illori on July 06, 2015, 05:19:14 AM
Admin -> Server Settings -> Disable evaluation of templates
Then post any new error messages without eval in them
Title: Re: 8: Undefined index: subject
Post by: spikeweb on July 06, 2015, 06:00:19 AM
Thanks for your help :)

I disabled this setting and pruned the all log records.

Then the first message (and next ones) to be displayed is :

MYFORUM/index.php?action=dlattach;topic=TOPICID;attach=ATTACHMENTID;
8: Undefined index: subject
Fichier: /PATH_TO_FORUM/public_html/Themes/MYTHEME/index.template.php
Ligne: 530
Title: Re: 8: Undefined index: subject
Post by: Illori on July 06, 2015, 06:09:56 AM
can you attach your themes index.template.php file to your next post?
Title: Re: 8: Undefined index: subject
Post by: spikeweb on July 06, 2015, 06:50:56 AM
Here it is :)

Thanks a lot !
Title: Re: 8: Undefined index: subject
Post by: Illori on July 06, 2015, 07:20:45 AM
try changing line 530 to this

<h2>', (!empty($context['subject']), '</h2>';

that may solve the problem.... this seems specific to this theme or a mod you have installed, so i cant test if it fixes the issue.
Title: Re: 8: Undefined index: subject
Post by: spikeweb on July 06, 2015, 09:57:41 AM
Thanks a lot as this solved the problem with error messages.

Il will look at any new message if there is any relationship or not.

FYI the theme is based upon Redsy theme proposed to SMF Community recently :)