Aggregation settings are not removed from fields when turned off

Created on 28 June 2013, over 11 years ago
Updated 18 September 2021, about 3 years ago

When creating a view, if 'use aggregation' has been turned on and aggregation settings set for a field, the field remains aggregated even after 'use aggregation' has been turned off.

Steps to reproduce

  1. Create a new view displaying fields
  2. Turn on aggregation for the view display under advanced settings
  3. Include a field, e.g. NID or Title and set your aggregation settings for the field, e.g. count.
  4. Verify that your view preview is showing an aggregate result
  5. Turn off aggregation under advanced settings
  6. Verify that the preview is still showing an aggregate result.
  1. And for bonus points...
  2. Remove the field, clear caches etc.
  3. Add in the same field again.
  4. Verify that the preview is still showing an aggregate result.

Expected Behaviour

Expected behaviour is that when 'use aggregation' is turned off, the field goes back to behaving default, non-aggregate behaviour.

What Happened Instead

Instead, the field retained its aggregate settings.

🐛 Bug report
Status

Needs work

Version

9.5

Component
Views 

Last updated 31 minutes ago

Created by

🇮🇪Ireland anthonylindsay

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇷Iran sgarsivaz

    I encountered this problem with D9.5.x

  • Status changed to Postponed: needs info 8 days ago
  • 🇳🇱Netherlands Lendude Amsterdam

    Tried to reproduce with the given steps in a clean Umami install but I can't, not much has changed around this code so I'd be surprised if it was suddenly fixed, but we need some new steps to reproduce I think

  • 🇦🇹Austria maxilein

    I am sure I will find a more complex use case in the near future. Then I will post it here.
    But a small detail is:

    At first upon creating a view, then enabling aggregation, the aggregation settings do not know which type of aggregation to use for a field.
    Selecting SUM, saving, then deactivating aggregation, saving again
    then reactivating aggregation - all the fields get/keep their type of aggregation that was selected on a field before..

    Unless this is on purpose, it is an indication that the settings are not fully cleared - and this may be (I don't know - just in idea) a source of error for more complex scenarios with referenced entity aggregation and multiple saving of various changes.
    At least the user has no possibility to completely reset the aggregation settings.

Production build 0.71.5 2024