Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I did a search to see if there was an issue created for this yet. I didn't see one.
I hope this helps.
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/ajax/preview/<my view>
StatusText: Service unavailable (with message)
ResponseText: Exception: d7cx: Column-level distinct is not supported yet. in views_plugin_query_default->compile_fields() (line 900 of /home/user/site.com/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Comment | File | Size | Author |
---|---|---|---|
#13 | 863478-distinct-support-broken.patch | 2.96 KB | dawehner |
#10 | 863478-distinct-support-broken.patch | 3.38 KB | dawehner |
#9 | 863478-distinct-support-broken.patch | 1.33 KB | Damien Tournoud |
#6 | _009.png | 25.6 KB | Unnamed |
Comments
Comment #1
dawehnerAs you can read in the error message. This feature is not support by dbtng at the moment.
Comment #2
gr33nman CreditAttribution: gr33nman commentedThanks for your reply. If this type of input is not helpful, please let me know.
Comment #3
dawehner.
Comment #4
esmerel CreditAttribution: esmerel commentedReally, this is more like "Can't fix", but once dbtng supports it, this might need revisiting.
Comment #5
gr33nman CreditAttribution: gr33nman commentedOkay - good to know the limits of views in D7. Thanks.
Comment #6
Unnamed CreditAttribution: Unnamed commentedI have a similar problem.
There's concluded views in which the same information.
If I set the value of Distinct: Yes, it appears a similar error:
(D7-dev, Views-dev)
Comment #7
mfer CreditAttribution: mfer commentedNo field level distinct should have been filed against core. Now that it has this should be postponed until that is fixed. See #975936: No Field Level Distinct Query Support
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis is a Views bug.
*I* added that exception to the code. Column-level distinct is a myth. What Views needs to use is a GROUP BY, and Views needs to decide what to do with the non-grouped fields.
Comment #9
Damien Tournoud CreditAttribution: Damien Tournoud commentedAs Dave Reid pointed out, Views already adds a GROUP BY in that case. Fixing the immediate bug should then be as easy as this.
Comment #10
dawehnerquery->distinct() is never called.
Uncommented the stuff out and moved a bit around.
This works for me.
Just as a notice, groupby and distinct together removes the "distinct"-feature by adding the base field to the groupby.
Comment #11
Damien Tournoud CreditAttribution: Damien Tournoud commentedThe point is: we don't want nor need this. The
add_groupby
is all that matters.Hm. What explains that clicking on this damn checkbox in the UI does something then?
Comment #12
dawehner$this->set_distinct set's $this->distinct
And
needs this flag.
Comment #13
dawehnerSo what about this patch.
Comment #14
mfer CreditAttribution: mfer commentedDoes this mean no row level distinct support in Views? If not, how will distinct be handled?
Comment #15
Scott Reynolds CreditAttribution: Scott Reynolds commentedThis worked great guys, thanks!
Comment #16
dawehnerThanks
Commited to the 7.x branch.