News:

Wondering if this will always be free?  See why free is better.

Main Menu

New problem

Started by ACAMS, October 14, 2010, 07:04:35 PM

Previous topic - Next topic

ACAMS

I have SMF 2.0 RC3

When we click "Show new replies to your posts." We get this error.

Database Error   Unknown column 'pi.id_topic' in 'on clause'
File: /home/gametechmods/gametechmods.com/forums/Sources/Recent.php
Line: 1124

I never use the feature, so I have no idea how long it has been doing that.

Here are lines 1107 to 1124 and I don't see anything wrong


   
   if (!empty($have_temp_table))
   $request = $smcFunc['db_query']('', '
    SELECT t.id_topic
    FROM {db_prefix}topics_posted_in AS t
     LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
     '. ($can_ignore ? 'LEFT JOIN {db_prefix}ignore_topics AS it ON (it.id_topic = pi.id_topic AND it.id_member = {int:current_member})' : '') .'
    WHERE t.' . $query_this_board . '
     AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
     '. ($can_ignore ? 'AND IFNULL(it.id_topic, 0) = 0' : '') .'
    ORDER BY {raw:order}
    LIMIT {int:offset}, {int:limit}',
    array_merge($query_parameters, array(
     'current_member' => $user_info['id'],
     'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
     'offset' => $_REQUEST['start'],
     'limit' => $context['topics_per_page'],
    ))
   );




Anybody have any idea what may be wrong?

gbsothere

#1
This is how that block of code appears in a fresh Recent.php for RC3

if (!empty($have_temp_table))
$request = $smcFunc['db_query']('', '
SELECT t.id_topic
FROM {db_prefix}topics_posted_in AS t
LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
WHERE t.' . $query_this_board . '
AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
'offset' => $_REQUEST['start'],
'limit' => $context['topics_per_page'],
))
);



Yours appears to have been edited.  Do you have a mod that might have edited this file?

Also, did you start out with RC3 or upgrade to it?  If you upgraded, did that process go smoothly?



EDIT:  It looks like the "Ignore Topics" mod (which does create that column in the database).  You may want to ask about it here:

http://www.simplemachines.org/community/index.php?topic=240146.0

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

ACAMS

Yes, I do have Ignore topics installed, and that is probably when it started......Thanks, I will ask over there.

Advertisement: