TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: HarshReality on November 15, 2008, 08:11:41 PM

Title: [bugtracker] TPprint template.php undefined Index topic_subject
Post by: HarshReality on November 15, 2008, 08:11:41 PM
Undefined index: topic_subject
default/TPprint.template.php
Line: 14

Line reads:
  <title>', $txt[668], ' - ', $context['topic_subject'], '</title>
Pointing to reference $context['topic_subject'] either not being defined or improperly explained.

Topic_subject is only referenced in post.php and printpage.php no other definition used in sources..
harshreality@harshreality-desktop:~/Desktop/TP-SMF/SMF1.1.7/Sources$ grep -i -n 'topic_subject' *
Post.php:1779:   list ($context['topic_subject']) = mysql_fetch_row($request);
Post.php:1820:   list ($ID_MSG, $context['topic_subject'], $message) = mysql_fetch_row($request);
Post.php:1823:   censorText($context['topic_subject']);
Post.php:1865:            'subject' => $txt['notifyXAnn2'] . ': ' . $context['topic_subject'],
Printpage.php:89:      if (!isset($context['topic_subject']))
Printpage.php:90:         $context['topic_subject'] = $row['subject'];
and.. the following is for default theme..

Post.template.php:1118:                  ', $txt['announce_this_topic'], ' <a href="', $scripturl, '?topic=', $context['current_topic'], '.0">', $context['topic_subject'], '</a>


Post.template.php:1153:                  ', $txt['announce_sending'], ' <a href="', $scripturl, '?topic=', $context['current_topic'], '.0" target="_blank">', $context['topic_subject'], '</a>

Printpage.template.php:12:      <title>', $txt[668], ' - ', $context['topic_subject'], '</title>
TPprint.template.php:14:      <title>', $txt[668], ' - ', $context['topic_subject'], '</title>

Title: Re: [bugtracker] TPprint template.php undefined Index topic_subject
Post by: HarshReality on December 24, 2008, 11:44:54 AM
How we doing guys?
Title: Re: [bugtracker] TPprint template.php undefined Index topic_subject
Post by: G6Cad on December 24, 2008, 01:01:50 PM
We selebrate Xmas
Title: Re: [bugtracker] TPprint template.php undefined Index topic_subject
Post by: bloc on January 07, 2009, 09:15:23 AM
- Template referred to non-existing variable. fixed for TP v1.0 beta 3.

For an quick fix, exchange $context['topic_subject] with $context['page_title'].