- Issue created by @digitalcatalyst
- First commit to issue fork.
- 🇧🇾Belarus aylis
digitalcatalyst, thank you for creating this issue, I'm faced similar problem with commerce add_to_cart form.
We have a link to this form added to custom modal form called on variation page, which alters original add_to_cart form and, besides other additions, adds login-like form inside. So when user submits that custom modal, he need to be redirected automatically to variation page back with variation added to cart.
This process gets broken as entity_form_steps module checks add_to_cart in getSteps method. Following error appear in logs:
Error: Call to a member function getThirdPartySettings() on null in Drupal\entity_form_steps\Form\EntityFormSteps::getSteps() (regel 32 van /app/web/modules/contrib/entity_form_steps/src/Form/EntityFormSteps.php).
Looks like that's because no from_display property set within that form, I do not have time to dig deeper into it.My proposition is simply check if form_display variable is set before using it. Looks like that won't break any logic. I've committed proposition to separate MR, not sure if error handling need to be used here, as null check will suffice.