Skip to content

Magento 2.3.4 Quote Address Extension Attribute Issue #26682

Closed
@NathMorgan

Description

@NathMorgan

Preconditions (*)

  1. Using Magento 2.3.4
  2. USing a custom extension attribute on Magento\Quote\Api\Data\AddressInterface Example module here: https://github.com/NathMorgan/module-test-module

Steps to reproduce (*)

  1. Sending a post request to estimate-shipping-methods containing a extension_attributes

For example a post request to /rest/default/V1/guest-carts/{cartId}/estimate-shipping-methods with the following example data {"address":{"street":["Example High Street"],"city":"Example City","region_id":null,"region":null,"country_id":"GB","postcode":"TES 01","company":"Example Company","telephone":"0000 00000","fax":null,"extension_attributes":{"test_attribute":"2"}}}

Expected result (*)

  1. Above action completed successfully

Actual result (*)

  1. 500 Error with the message Uncaught Error: Call to a member function setDiscounts() on array in /var/www/html/vendor/magento/module-sales-rule/Model/Quote/Discount.php: 117

This issue seems to be introduced with this commit: 6900c38

This seems to effect any extension attribute set on Magento\Quote\Api\Data\AddressInterface that is not a object

Metadata

Metadata

Labels

Component: CheckoutComponent: QuoteComponent: ShippingFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions