Problem/Motivation

When adding a computed base field to the commerce_product_variation entity type, for example in order to use it as a Product Attribute field, \Drupal\commerce\CommerceEntityViewsData::getViewsData() errors out because computed fields don't have a schema.

Proposed resolution

Skip generating views data for computed fields.

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
FileSize
885 bytes

Here's a patch for this.

amateescu’s picture

Also attaching a patch for the current stable Commerce release, so it can be used in projects that don't use the -dev version.

amateescu’s picture

jsacksick’s picture

Status: Needs review » Fixed

Your fix ls the appropriate one :), thanks, committed!

jsacksick’s picture

Attaching a patch that should apply to 2.19.

bradjones1’s picture

FYI this issue is missing commit credit.

jsacksick’s picture

Not sure why, the commit author was properly set to Andrei.
https://git.drupalcode.org/project/commerce/-/commit/0efa05b162a6d54f526...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.