Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2007 at 21:24 UTC
Updated:
3 Nov 2007 at 06:37 UTC
The old handbook entry on how to make the A/B/C view (http://drupal.org/node/74715) has the following link: http://www.elderweb.com/home/sitemap/A
If you check out that link you see the exact same thing I am seeing on my Drupal site. I am trying to use the Summary + full view feature and I get a letter for each node that is in a particular term. So, if I have three nodes in one term, and that term starts with B, then I get B (1) | B (1) | B (1) instead of B (3)
I got this behavior on 5.x-1.0 and 5.x-1.x-dev. In fact, in the dev version I got B (1) || B (1) || B (1)
Comments
Comment #1
karens commentedI think this was broken in the latest version of Views. See my comments at http://drupal.org/node/134375 for a suggested fix that will get this working right again.
Comment #2
karens commentedFix this by opening your view to edit it and going to the Arguments section. There you need to change anything that has 'Summary, sorted as view' to 'Summary, sorted ascending'. I'm going to make this fix in the handbook page, too.
Comment #3
(not verified) commentedComment #4
crbassett commented&I made the suggested change, and it fixed half of the problem.
My first problem was if I had say, two nodes in the "Apple; category and one in the "Aardvark" category, I got the following alpha list:
A (1) | A (1) | A (1)
Now, I get A (2) | A (1). That is, I am still not getting true alpha paging. I can't get what the example says on the project page:
The example on the project page would look like this on my site:
Am I missing something? Should I just use 4.7.6? Currently I am using the latest Drupal core and View and View Bonus pack modules...I installed the site fresh this morning.
Comment #5
csc4 commentedI have the same problem and have had since April - I'm trying to launch three sites and can't until this is fixed. I'm totally confused about which version of Views and Views Bonus are supposed to be used so this works.
I have sorted the views ascending but the built in taxonomy directory and my view both show things like:
* A (1) | * A (1) | * C (1) | * C (1) | * C (1) | * C (1) | * D (1) | * D (1) | * E (1) | * E (1) |which is just hopeless.If it was a change to views which broke this couldn't it be backed out - or we be told a 'safe' version of views to use? It has been broken for me for about two months and I think I've tried just about every combination of versions. HELP please!
Comment #6
csc4 commentedCould really use some help here - this is an absolutely critical problem with Summary Views
Comment #7
emmajane commentedThis also does not work for me: http://gbcn.ca/directory
Perhaps it's a problem with the view settings? Pasted here for your reference:
Comment #8
emmajane commentedThis also does not work for me: http://gbcn.ca/directory
Perhaps it's a problem with the view settings? Pasted here for your reference:
Comment #9
dmitrig01 commentedthis is a bug in views module, not views_bonus
Comment #10
csc4 commentedIf it's a known bug does that mean there's a known fix? I've been reporting this for some time - and have already had to delay a site launch as there appears to be no fix and no workaround. It's manifesting on Drupal 5 sites all over the place (including elderweb)... if someone knows the answer - @dmitrig01? - then please share it as I have no working summary listings at all.
Comment #11
Thomas Sewell commentedWould someone having this problem test to see if the problem occurs on their site when they are logged in as user 1? Just double-checking to see if this is the same issue as http://drupal.org/node/157453 or a different issue. If it's the same issue, it may be permissions related somehow.
Comment #12
csc4 commentedSadly I'm almost always logged in as user 1 so I don't think that's the issue for me at least - but I'm convinced that you're right and the issue is that distinct is being introduced erroneously.
I've been trying to understand this for months but my core knowledge isn't quite strong enough - better than it was two months ago now though!
The advice regarding the db_rewrite_sql issues usually suggest adding brackets around the where clause in order to make sure the distinct is applied only where it should. I know this solved it for me with my own custom blocks which were exhibiting very similar errors but I have no idea how to go about putting this right for the entire view module!
I also think there are two different things going on - the first one is the default views sort order must have changed requiring the sort ascending workaround, the second is something to do with the distinct clause. I'm surprised this doesn't seem to be a higher priority considering it's breaking out of the box installs and demo pages for views related modules! I'm trying to launch my first drupal project and my client is not impressed that I haven't been able to solve this since April.
Comment #13
crbassett commentedI also get this problem logged in as user 1. I too have a couple sites that desperately need this functionality. Unfortunately, I am not a coder, so this is hard for me to figure out.
Comment #14
crbassett commentedForgive me for my questions. I'm just wondering how "deep" of a problem this is. Since I don't understand the ins and outs of PHP it is hard for me to gauge things.
Anyway, is there anyone looking into this? What kind of cash bounty would it take to get this done? I have limited resources, but it is getting to the point where I might need to offer some $$ to get it fixed. There are others who've posted here about needing this fixed before they launch some websites. Would they be interested in chipping in some $$ to get this done?
Comment #15
merlinofchaos commentedOkay, figured out this problem. To summarize:
For Postgres compatibility, whenever an ORDER BY is added to the query, that order by MUST ALSO be in the select.
In the case of summaries by taxonomy title, when using letters, what we were ORDERing on didn't exactly match what was in the select, so it added it again. Which means the summary was completely breaking because it was trying to group on full terms. This, obviously, failed hideously, giving the result you see here. This actually turns out to be a very different bug than what I thought it was, which is part of why this took so long to track down and fix.
Fix committed to HEAD. New release rolled soon.
Comment #16
crbassett commentedThanks so much. I'll be testing it on Tuesday, July 17th. I'll post here with results.
Comment #17
csc4 commentedThis is brilliant news - thanks for persevering with this.
Thanks.
Comment #18
crbassett commentedI've tested the HEAD version and it works correctly as you say. Thank you very much for the work. I truly appreciate it.
Comment #19
(not verified) commentedComment #20
druvision commentedNo longer needed to install HEAD.
The combination of Views Bonus 5.x-1.2-alpha1 + Views 5.x-1.6.5 does it out of the box
Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | בניית אתרים
Personal: Hitech Dolphin: Regain Simple Joy :)
Comment #21
bsuttis commentedI'm still getting this problem on a fresh install of 5.2, with Views 5.x-1.6 and the latest Views Bonus.
Comment #22
rimma commentedjust follow up this issue.
Comment #23
bsuttis commentedI think I understand why it wasn't working for me, I've been trying to use this with an argument of Node:Title (with option set to 1) with absolutely no luck.
As soon as I change the argument to Taxonomy:Term Name, all works as it should. The problem is, I want this sorting functionality for my node titles, I don't want to have to tag each node. Is this not able to work with Node:Title as the argument?
Comment #24
bsuttis commentedAck, ignore what I said above.
It seems to be working for me now.