Problem/Motivation

We have an issue that order shipping profiles are saved with empty address after updating Commerce API to 8.x-1.0-beta10.

I have found it happens since Drupal\commerce_api\Plugin\Field\FieldType\OrderProfile::propertyDefinitions() started including metatag fields to the returned list. While metatag fields are base fields they are not excluded as they are supposed to.

Steps to reproduce

  1. Set up a commerce site with Commerce API, Commerce Shipping and Metatag modules enabled and configured.
  2. Add a product to cart and go through checkout via UI as anonymous user.
  3. At the review step see no shipping address in the shipping information pane.
  4. Open order shipping profile as admin and see empty address fields in it.

Proposed resolution

We should reconsider how the base fields are excluded from the properties list.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Alex Bukach created an issue. See original summary.

alex.bukach’s picture

Title: OrderProfile propertyDefinitions include base fields » OrderProfile::propertyDefinitions() include base fields
Assigned: alex.bukach » Unassigned
Status: Active » Needs review
StatusFileSize
new1.59 KB
jsacksick’s picture

Maybe we should be excluding computed and internal fields? the metatag module defines a computed field.

Also, this kind of conflicts with the changes from #3175106: Postal code validity is not checked when creating\updating an order address, call returns 200.

alex.bukach’s picture

@jsacksick the conflict is easy to resolve.

As for checking computed and internal fields, do you have any scenario in mind then it will give a different result?

jsacksick’s picture

Status: Needs review » Fixed

Committed the patch from #4, thanks!

Status: Fixed » Closed (fixed)

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