Suetan wrote: I'm having a problem where it's got a "Postparse tooltip" link under the topic description.
Could not obtain topic information
DEBUG MODE
SQL Error : 1066 Not unique table/alias: 'pt'
SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2, phpbb_posts_text pt, phpbb_posts_text pt WHERE t.forum_id = 2 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 AND t.topic_first_post_id = pt.post_id AND pt.post_id = t.topic_first_post_id AND p.post_draft = 0 ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC
Line : 437
File : viewforum.php
Code: Select all
SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.* FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2, phpbb_posts_text pt WHERE t.forum_id = 2 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 AND t.topic_first_post_id = pt.post_id AND pt.post_id = t.topic_first_post_id AND p.post_draft = 0 ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC
Swizec wrote: Can't say exactly which mod is at fault, but change that query so it reads something like so
Parse error: parse error, unexpected T_STRING in /home/Brian/public_html/BKUP3/viewforum.php on line 457
Code: Select all
//
// All announcement data, this keeps announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
AND pt.post_id = t.topic_first_post_id
AND p.post_draft = 0
ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC ";
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
AND pt.post_id = t.topic_first_post_id
AND p.post_draft = 0
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_priority DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
// mod topic description: add to query
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, pt.bbcode_uid, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
AND t.topic_first_post_id = pt.post_id
AND pt.post_id = t.topic_first_post_id
AND p.post_draft = 0
ORDER BY t.topic_priority DESC, t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$topic_rowset = array();
$total_announcements = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;
}
$db->sql_freeresult($result);
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
// mod topic description: add to query
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.bbcode_uid, pt.*
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt, " . POSTS_TEXT_TABLE . " pt
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
AND t.topic_first_post_id = pt.post_id
AND pt.post_id = t.topic_first_post_id
AND p.post_draft = 0
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_priority DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
DEBUG MODE
SQL Error : 1054 Unknown column 'f.auth_desc' in 'field list'
SELECT f.auth_desc, f.auth_moddesc FROM phpbb_forums f WHERE f.forum_id=4 LIMIT 0,1
Line : 61
File : functions_desc.php