Hello,

I am using PostgreSQL.
I have a page of death when trying to view sub-forums.

I try to remove modules one by one but catching the error is tricky.
Anyone with the same issue?

Kind regards,
Jean-Michel

Comments

grub3’s picture

After removing all modules, page of death is still here.
Maybe it is because I am using latest Views 3.0 beta.
Any idea if this could be the case?

michelle’s picture

Quite possibly. AF has never been tested with Views 3.

Michelle

grub3’s picture

Thanks Michele, this is probably the case.

According to http://drupal.org/node/695302

Views API developers
Plugins have been retooled to require the use of option_definition(). This has two major effects:
1. Plugins that did not previously use this system (argument validate, argument default, access, cache) must be converted to the new system. Look at existing argument validate plugins to see how they are converted.
2. Settings that were not in the option_definition() would previously be saved because any setting in the form was saved. This is no longer true. If your plugin or handler needs a setting, it now must be in the option_definition() or it will not be kept.

michelle’s picture

Title: Page of death » Make AF work with Views 3
Category: bug » task
Status: Active » Postponed (maintainer needs more info)

Yeah, there's been major changes in Views 3. I'd be extremely surprised if AF worked with it. Setting this postponed. I'm not touching this until Views 3 is out of alpha at least, maybe RC.

Michelle

michelle’s picture

Status: Postponed (maintainer needs more info) » Postponed

Ugh, clicked the wrong postponed.

Michelle

michelle’s picture

Status: Postponed » Active

Setting this active to avoid dupes as more and more people start using V3. Not working on it, yet.

Michelle

tecsbrain’s picture

I'd update AF2's instructions to say "Use the latest dev version of Views2" instead of just Views - technically 3 is alpha and not dev, but it sounds like we're trying to be on the cutting edge of things and... I'm just glad I had the presence of mind to check here before I installed the whole lot.

Great mod by the way!

michelle’s picture

Er, what instructions? I haven't documented AF 2.x, yet, except for a page on the style system and, the project page already lists View 2.x.

Michelle

artscoop’s picture

Hi,
Well, for those who get a warning on the last_updated column (that would mean the node_comment_statistics table is created by views 3 ?),
just remove the column from the topics view and replace it with the « Date of last comment » field.

Anyway, the default views definition of Advanced Forum fits well except for one field.
Again, those who get a user warning can edit the view to fix this.

(Well Michelle, if I were not that broke, I would have donated for a few Drupal projects.)

freeonlinehost’s picture

Version: 6.x-2.x-dev » 6.x-2.0-alpha2

Sorry for posting this on two threads, this one may get more attention!

If it's any help, below is the dump of errors I get:

Unknown column 'node_comment_statistics.last_updated' 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.type AS node_type, node.title AS node_title, users.name AS users_name, users.uid AS users_uid, node.created AS node_created, node_comment_statistics.comment_count AS node_comment_statistics_comment_count, 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, GREATEST(node.changed, node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated, node.sticky AS node_sticky, node.comment AS node_comment, node_comment_statistics.last_updated AS node_comment_statistics_last_updated_1, node.sticky AS topic_is_sticky, forum.tid AS topic_actual_forum, 'advanced_forum_topic_list:default' AS view_name 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 INNER JOIN users users ON node.uid = users.uid INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid 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' LEFT JOIN forum forum ON node.vid = forum.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'content_access_author') OR (na.gid = 1 AND na.realm = 'content_access_rid') OR (na.gid = 1 AND na.realm = 'friendlist_node_access_ALL') OR (na.gid = 0 AND na.realm = 'friendlist_access_node_access_author') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 1 AND na.realm = 'forum_access'))) AND ( (node.status <> 0) AND (term_node.tid = 6) )ORDER BY node_sticky DESC, node_comment_statistics_last_updated_1 DESC LIMIT 0, 20 in /home/account/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1093.

I am using 6.17, upgraded from 6.16
Advanced forum 6.x-2.0-alpha2.
Views 6.x-3.0-alpha3

The only way I don't get that error is to disable advanced forum awaiting a native fix, no use trying a fix then updrade and get it all over again!

It seems I don't get an error if the forum category has a thread, but get it if the forum is empty without any threads (just a master forum category)!
Chances are, most webmasters who get this error are with new forums, i.e just setting up new categories without threads / content!

merlinofchaos’s picture

#10 is a bug in Views 3, not in AF: http://drupal.org/node/833790

michelle’s picture

Version: 6.x-2.0-alpha2 » 6.x-2.x-dev

He said in IRC, "You can work around it by disabling clicksorting on that field." so there's a workaround people can use for now.

I'm going to leave this issue open until I have a chance to thoroughly test AF with Views 3 and make sure there's no other issues.

Michelle

secoif’s picture

@Michelle

Do you have an ETA? We are looking at waiting for Views 3 fix VS an alternative solution to get around this on an existing (currently borken) site. If it's a long way off, could you recommend an alternative?

michelle’s picture

@secoif: Nope. I have no need to use Views 3 and it's still in development so it's not a high priority for me. If it's a priority for you, feel free to jump in and help. At this point, there's no known issues with AF and Views 3 so testing is what's needed and anyone can do that.

Michelle

hillaryneaf’s picture

subscribing... I too need to make sure AF is working with Views 3 before I install it.

michelle’s picture

@nektir: Or, you could install it and help test. This is open source. Anyone can jump in and help. There are over 10 thousand people using this module. There's no reason that people need to just wait for me to get around to testing something I don't even use. If you need it, try it and see if it works. If it doesn't, file issues on the exact problem(s) you've found.

Michelle

michelle’s picture

Title: Make AF work with Views 3 » Make sure AF works with Views 3

Giving this a better title since, at this point, there's no indication that it doesn't work.

Michelle

hillaryneaf’s picture

Title: Make sure AF works with Views 3 » Make AF work with Views 3

Thanks @Michelle, we're always happy to test modules for developers. It's the least we can do for all your (free!) hard work. We have a drupal 6 site that is using Views 3 and we need to implement a forum in the next month or so. We are looking into phpBB or Drupal forum with Advanced forum. Since we're not currently using AF, it's not a high priority for us, but we have a a test site with Advanced forum, I'll add Views 3 to it and see what we find.

hillaryneaf’s picture

Title: Make AF work with Views 3 » Make sure AF works with Views 3

oops, didn't mean to change the title!

michelle’s picture

@nektir: Thanks! And I hope I didn't come off as too cranky. Just gets a bit frustrating at times having people "subscribing" and waiting for me to do something that they could so easily do and make it a win-win. Wasn't aimed at you in particular. I've had several people approach me about it outside of this issue as well so it was just a general build up of crankiness. :)

Michelle

shariharan’s picture

I applied the patch and I get the below error. I will continue to test.

user warning: Unknown column 'alias' in 'order clause' query: SELECT node.nid AS nid, node_revisions.teaser AS node_revisions_teaser, node_revisions.format AS node_revisions_format, node.type AS node_type, 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_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, GREATEST(node.changed, node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated, 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 = 1 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' LEFT JOIN forum forum ON node.vid = forum.vid WHERE (node.status <> 0) AND (term_node.tid = 1) ORDER BY node_sticky DESC, alias DESC LIMIT 0, 20 in C:\Apache2.2\htdocs\d6_forum\sites\all\modules\views\plugins\views_plugin_query_default.inc on line 1090.

Balrog’s picture

I seem to have fixed it. Hackish solution though.

In Views, two patches:


--- views/plugins/views_plugin_query_default.inc.orig 2010-08-26 04:49:42.000000000 +0000
+++ views/plugins/views_plugin_query_default.inc      2010-08-26 04:47:12.000000000 +0000
@@ -840,7 +840,7 @@
     }
 
     $this->orderby[] = "$as " . strtoupper($order);
-
+    return $as;
 /**
  * -- removing, this should be taken care of by field adding now.
  * -- leaving commented because I am unsure.

and (this is after applying the patch referenced in #11):

--- ./modules/comment/views_handler_field_ncs_last_updated.inc.orig     2010-08-26 04:55:12.000000000 +0000
+++ ./modules/comment/views_handler_field_ncs_last_updated.inc  2010-08-26 04:47:42.000000000 +0000
@@ -16,6 +16,6 @@
   function click_sort($order) {
     $this->ensure_my_table();
     $this->node_table = $this->query->ensure_table('node', $this->relationship);
-    $this->field_alias = $this->query->add_orderby(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->options['order'], $this->table_alias . '_' . $this->field);
+    $this->field_alias = $this->query->add_orderby(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $order, $this->table_alias . '_' . $this->field);
   }
 }

I DO NOT RECOMMEND using these patches. I'm not a Drupal expert, and I'm quite sure these are following proper coding practices.
The issue seems to be caused by a combination of $this->options['order'] being empty, and $as not being returned, which leaves $this->field_alias empty. Later this fails, leading to the WSOD.

Balrog’s picture

Looks like this may have broken # of Replies.

timwee’s picture

Title: Make sure AF works with Views 3 » Thank you.

Thank you Balrog , is working :)

michelle’s picture

Title: Thank you. » Views 3 compatibility

Fixing title.

Michelle

linl’s picture

I've just installed Advanced Forum with Views 3 for the first time. Initially, I got the same error as in #10, but once I'd edited the views for the workaround mentioned in #12, all appears to be working fine, though I have very little content so far to really test it.

Thought it might be worth documenting what I did in a bit more detail. I edited four of the views: advanced_forum_active_topics, advanced_forum_group_topic_list, advanced_forum_new_topics, and advanced_forum_topic_list. (All the Advanced Forum views except advanced_forum_unanswered_topics.)

For each view:

  • I edited the default display of the View.
  • In the Style settings section, clicked the "gear" next to Style: Forum topic list to change the settings.
  • Then in the Defaults: Style options list, I unticked the Sortable column in the Last post field row.
  • And changed the Default sort to one of the other fields.
  • Updated and Saved as usual.

All seems fine at the moment, but will continue testing.

I'm using Drupal 6.19, Advanced Forum 6.x-2.x-dev (2010-Aug-27), Views 6.x-3.x-dev (2010-Sep-15).

michelle’s picture

@LinL: Thanks for the feedback. As that's working around a bug that will, presumably, be fixed at some point, I'm not going to make that change in AF. If you find anything else, please let me know. It's possible there may be changes that need to be made but so far I haven't seen any.

Michelle

michelle’s picture

Status: Active » Fixed

The only known issue here was a bug in Views that was fixed on December 9. No one has reported any problems since then. I haven't tried it, yet, but am just going to assume it works unless told otherwise for now. Keeping an issue open for something that we don't even know if it's broken is kinda silly.

Michelle

Status: Fixed » Closed (fixed)

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

dgtlmoon’s picture

Status: Closed (fixed) » Active

reopening http://drupal.org/node/668566 is making a lot of noise again with last_updated column missing

dgtlmoon’s picture

A very rough hack to get mine working again was

mysql> alter table node_comment_statistics add last_updated int(11);
Query OK, 9954 rows affected (0.22 sec)
Records: 9954 Duplicates: 0 Warnings: 0

mysql> update node_comment_statistics set last_updated = last_comment_timestamp;

michelle’s picture

Status: Active » Closed (fixed)