Aggregation handler override causes schema errors

Created on 16 December 2016, over 7 years ago
Updated 20 April 2024, 5 months ago

Problem/Motivation

When fields are aggregated, the group_type can specify an handler override, for example sum specified numeric. However, the field is still saved using the original plugin_id, which can result in schema errors if the summed field does not extend numeric.

As an example, Payment module provides a payment_amount plugin that directly extends FieldPluginBase. The form from the numeric handler includes settings such as thousands separator and stores all of these properties in the config export, but as it has plugin_id: payment_amount, the schema for the numeric type is not extended and you get schema errors.

This blocks contrib from providing test coverage including schema checks if they have any provided views that suffer from this problem.

Proposed resolution

  • If aggregations uses a different handler, it should also change the stored plugin_id.
  • An update function to correct any existing aggregated views so they match their schema also.

Data model changes

Switch to storing the plugin that is actually used.

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 11 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom andrewbelcher

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    It has been 7 years since there was any discussion here. It is time to check in and see if this is still relevant.

    Is this still a problem on Drupal 10?

    Since we need more information to move forward with this issue, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024