TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 110
  • Total: 110

[bugtracker] TPprint template.php undefined Index topic_subject

Started by HarshReality, November 15, 2008, 08:11:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HarshReality

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>



G6Cad


bloc

- 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'].

This website is proudly hosted on Crocweb Cloud Website Hosting.