Cannot redeclare $themeHandler in DeepChatFormBlock.php
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3555447. -->
Reported by: [ronraney](https://www.drupal.org/user/3674214)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Hello, I'm using Drupal 11.2.5. I ran the <code>composer require</code> for this module and my site doesn't work now. I had Drupal AI working prior to doing this. I'm reporting my error in case it's a bug in the newest version of the module. I've been troubleshooting and not finding a root cause.</p>
<p><code>Fatal error: Cannot redeclare Drupal\ai_chatbot\Plugin\Block\DeepChatFormBlock::$themeHandler in /var/www/html/web/modules/contrib/ai/modules/ai_chatbot/src/Plugin/Block/DeepChatFormBlock.php on line 92</code></p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<p>Please provide information like AI modules enabled, which AI provider, browser, etc.</p>
<p>I have Drupal AI and Agents installed and enabled. I have an instance of a DeepChat block. I was doing some troubleshooting on a separate issue. I updated Drupal AI as part of that process. I think this is when my site became unusable.</p>
<p>My VS Code sees something is wrong at line 92 of this file. It's telling me I cannot redeclare. Another instance of $themeHandler is declared on line 78. When I comment out line 92, the site works.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Figure out which one needs to be there: Line 78 or 92.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
issue