Closed (fixed)
Project:
Advanced Forum
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2010 at 11:41 UTC
Updated:
28 Mar 2011 at 15:19 UTC
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
Comment #1
grub3 commentedAfter 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?
Comment #2
michelleQuite possibly. AF has never been tested with Views 3.
Michelle
Comment #3
grub3 commentedThanks 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.
Comment #4
michelleYeah, 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
Comment #5
michelleUgh, clicked the wrong postponed.
Michelle
Comment #6
michelleSetting this active to avoid dupes as more and more people start using V3. Not working on it, yet.
Michelle
Comment #7
tecsbrain commentedI'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!
Comment #8
michelleEr, 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
Comment #9
artscoop commentedHi,
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.)
Comment #10
freeonlinehost commentedSorry 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!
Comment #11
merlinofchaos commented#10 is a bug in Views 3, not in AF: http://drupal.org/node/833790
Comment #12
michelleHe 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
Comment #13
secoif commented@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?
Comment #14
michelle@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
Comment #15
hillaryneaf commentedsubscribing... I too need to make sure AF is working with Views 3 before I install it.
Comment #16
michelle@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
Comment #17
michelleGiving this a better title since, at this point, there's no indication that it doesn't work.
Michelle
Comment #18
hillaryneaf commentedThanks @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.
Comment #19
hillaryneaf commentedoops, didn't mean to change the title!
Comment #20
michelle@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
Comment #21
shariharan commentedI 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.Comment #22
Balrog commentedI seem to have fixed it. Hackish solution though.
In Views, two patches:
and (this is after applying the patch referenced in #11):
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.
Comment #23
Balrog commentedLooks like this may have broken # of Replies.
Comment #24
timwee commentedThank you Balrog , is working :)
Comment #25
michelleFixing title.
Michelle
Comment #26
linl commentedI'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:
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).
Comment #27
michelle@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
Comment #28
michelleThe 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
Comment #30
dgtlmoon commentedreopening http://drupal.org/node/668566 is making a lot of noise again with last_updated column missing
Comment #31
dgtlmoon commentedA 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;
Comment #32
michelleThat error is a Views issue: #833790: Click sorting causes malformed query with Node: Updated/commented date
Michelle