Error: Call to a member function newInstance() with ActionPluginDeriver
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3525540. --> Reported by: [robloach](https://www.drupal.org/user/61114) Related to !624 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Regarding <a href="https://www.drupal.org/project/ai_agents/issues/3525531">#3525531</a> , it is possible to get the following error...</p> <pre>Error: Call to a member function newInstance() on null in Drupal\ai\Plugin\AiFunctionCall\Derivative\ActionPluginDeriver-&gt;resolveRootDataType() (line 183 of ai/src/Plugin/AiFunctionCall/Derivative/ActionPluginDeriver.php).</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>1. Install latest version of Drupal AI Agents module - <code>1.1.0-beta2</code> in Drupal <code>10.4.6</code><br> 2. Go to <a href="https://www.drupal.org/admin/config/ai/agents">AI Agents Settings</a> page<br> 3. Click on <a href="https://www.drupal.org/admin/structure/ai_agent/add">+ Add AI Agent</a> button</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a fallback for the context definitions so that we don't run into that PHP error.</p> > Related issue: [Issue #3525531](https://www.drupal.org/node/3525531)
issue