This is using the example payment gateway on a totally vanilla commerce_base setup. When I take a shippable product into checkout review, I'm getting this error: The "profile" entity cannot have a URI as it does not have an ID at Drupal/Core/Entity/Entity.php line 179

Comments

ransomweaver created an issue. See original summary.

ransomweaver’s picture

This might be caused by the example payment gateway, as it doesn't throw this error when using my real gateway.

bojanz’s picture

The shipping tests don't use payments, so that might be why they pass.

Possibly related: #2849746: Payment methods are not reusable when shipping profile form is present in checkout.

replicaobscura’s picture

I'm getting this error, too. Once I hit the order review step, this exception is all I get, even if I try and go back to the previous step again to change the order information.

For the record, using my commerce_payflow module I am not seeming to get a validation error when selecting an exiting payment method and entering a shipping profile (as I believe the issue you linked to suggests), as I am sent to the /review page, it just gets the above exception.

ransomweaver’s picture

I find that if I click review without first clicking recalculate shipping (presuming more than one choice) the checkout advances to review and this error results there. And once the order is in checkout state review, it will always give this error.

replicaobscura’s picture

For me, after updating Commerce Shipping to the latest version a little while ago today, this error stopped coming up for me. However, now my shipping profile doesn't save at all. On the review page, no shipping info shows, and if I go back to the Order Information page, the shipping profile is blank again.

Not sure if this belongs under this issue or not, as I don't receive this particular error anymore, but just wanted to update on where I'm at with this issue since my last post.

bojanz’s picture

Status: Active » Needs review
StatusFileSize
new767 bytes

Can you please confirm that this patch fixes the issue.

bojanz’s picture

Title: checkout review error with shippable product » ShippingInformation's "Recalculate shipping" is not compatible with PaymentInformation

Better title.

ransomweaver’s picture

I think it solves the problem. I tested on a generic commerce setup, using braintree. Before If I submitted the payment information to review without clicking the recalculate shipping button, It would give this error. Now it goes to review without a problem.

  • bojanz committed cf4927a on 8.x-2.x
    Issue #2849594 by bojanz: ShippingInformation's "Recalculate shipping"...
bojanz’s picture

Status: Needs review » Fixed

Committed.

replicaobscura’s picture

Sorry for the delay, but just to confirm this seems to resolve the issue for me as well. Thanks for the fix!

  • bojanz committed 53808ee on 8.x-2.x
    Issue #2849594 part II: ShippingInformation's "Recalculate shipping" is...
bojanz’s picture

Okay, had to do another round of work on this.

1) We needed #limit_validation_errors, otherwise you couldn't Recalculate shipping if your payment information is incomplete. Reported by bmcclure.
The original problem that prompted this issue was fixed in Commerce: #2854145: Order payment method should be selectable and default.

2) Fixed an issue where the validation errors would not always be shown, by adding a workaround for a core bug.

3) Updated the tests to always use the PaymentInformation pane, ensuring that #1 doesn't actually happen.

Status: Fixed » Closed (fixed)

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