Call to a member function getDefaultVariation() on null in commerce_stock_notifications_form_alter()

Created on 31 July 2022, over 2 years ago
Updated 23 January 2023, almost 2 years ago

Problem/Motivation

Got error when trying to access to /admin/commerce/config/add-to-cart-link settings page of the module commerce_add_to_cart_link

Steps to reproduce

- Enable the module commerce_add_to_cart_link
- Go to /admin/commerce/config/add-to-cart-link
An error will occur.

Proposed resolution

Add a control on the product entity got from form_state to ensure it meets with ProductInterface.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇮Ivory Coast sgourebi

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.

Production build 0.71.5 2024