Hello!

I have this current (very basic) setup:
Container 1
-Forum 1
--Thread 1
--Thread 2

When attempting to view Forum 1, I get the following error:

user warning: Unknown column 'forum.tid' in 'field list' query: SELECT DISTINCT node.nid AS nid, node_revisions.teaser AS node_revisions_teaser, node_revisions.format AS node_revisions_format, node.title AS node_title, history_user.timestamp AS history_user_timestamp, node.created AS node_created, node.changed AS node_changed, node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp, users.name AS users_name, users.uid AS users_uid, node_comment_statistics.comment_count AS node_comment_statistics_comment_count, node.type AS node_type, node_counter.totalcount AS node_counter_totalcount, COALESCE(ncs_users.name, node_comment_statistics.last_comment_name) AS node_comment_statistics_last_comment_name, ncs_users.name AS ncs_users_name, node_comment_statistics.last_comment_uid AS node_comment_statistics_last_comment_uid, node.sticky AS node_sticky, node.comment AS node_comment, node.sticky AS topic_is_sticky, forum.tid AS topic_actual_forum FROM node node INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 4 INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid INNER JOIN users users ON node.uid = users.uid LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid LEFT JOIN users ncs_users ON node_comment_statistics.last_comment_uid = ncs_users.uid AND ncs_users.uid != '0' WHERE (node.status <> 0) AND (term_node.tid = 104) ORDER BY node_sticky DESC, node_comment_statistics_last_comment_timestamp DESC LIMIT 0, 20 in E:\Inetpub\wwwroot\modules\views\includes\view.inc on line 771.

Neither of the threads show up, and everything works OK without Adavanced Forum enabled.

Thanks

-Luke

Comments

michelle’s picture

I have absolutely no idea how your forum can be working if you don't have the tid column in your forum table. I'm not convinced this is an AF bug but will leave it as such for now. I'm trying to get someone who knows Views better than me to have a look at this.

Michelle

Magilla’s picture

My current `forum` table looks like this:

nid|vid|tid
898|1296|104
899|1297|104
902|1302|104
904|1311|105

I do have a `tid` field...

EDIT:
On further examination of this query, the forum table isn't actually joined in there anywhere. You're asking for forum.tid, but forum doesn't exist anywhere else in the query.

michelle’s picture

Issue tags: -error, -sql

Huh... That's true. You're totally missing the "LEFT JOIN forum forum ON node.vid = forum.vid" from the view. That's bizarre. I have no idea how that could happen.

All I can think of is double check that the view is being pulled from code.

Michelle

Magilla’s picture

How do you mean?

michelle’s picture

On the list of views, you should have "Default Node view: advanced_forum_topic_list (Advanced Forum) ". If it says "Overridden" instead of "Default" then it's not pulling from code anymore.

Michelle

Magilla’s picture

Hi Michelle

After disabling and re-enabling Advanced Forum, it's started working. All the Advanced Forum views are default, and all looks good.

Thanks!

Also, small typo in your views descriptions:
The description for advanced_forum_unanswered_topics reads "Shows unaswered topics in a given forum" instead of "Shows unanswered topics in a given forum".

Many thanks for your help!

-Luke

michelle’s picture

Status: Active » Fixed

Fixed the type and thanks for letting me know it's working. Must be something went goofy on install with the view.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drvdt’s picture

Hi,
I got the same bug. You can edit that view, and delete the field causes this problem! After that, it works normally.