ECA Render: Call to a member function getMode() on null in eca_render_form_alter()
Problem/Motivation
Reported by Cyril:
Interesting error I got while having ECA render module enabled. While using Drupal 9 Commerce, when I tried to add a product or promotion without adding a store I got a website error:
Error: Call to a member function getMode() on null in eca_render_form_alter() (line 292 of /var/www/html/web/modules/contrib/eca/modules/render/eca_render.module)
If I disabled ECA_render module it works with no error. With ECA_render enabled and adding a store in the configuration it works with no error. Not sure if this is a bug or works as expected?
Proposed resolution
Fix the bug.
Edited by drupalbot