AI CKEditor tools (Tone, Summarise) fail with "Call to a member function get() on null" on Drupal 11.4.0
<h3>Problem/motivation</h3>
On Drupal 11.4.0, using any AI CKEditor tool that relies on the shared
`AiCKEditorPluginBase::buildCkEditorModalForm()` method (confirmed with Tone
and Summarize) throws an uncaught error and returns a 500 response from
`/api/ai-ckeditor/dialog`. This happens on two independent Drupal 11.4.0
sites with no contrib modules in common (one runs Markdownify, CrowdSec, and
Advban; the other runs none of these), which rules out a third-party module
conflict.
The root cause is this line in `AiCKEditorPluginBase.php`:
$editor_id = $this->requestStack->getParentRequest()->get('editor_id');
`getParentRequest()` returns null because the AJAX dialog request is not
being handled as a nested sub-request in this Drupal 11.4 code path, so
calling `->get()` on it fails.
This may be related to #3581842: "AI Ckeditor test broken with Drupal 11.4",
which confirms a general compatibility regression between ai_ckeditor and
Drupal core 11.4, though that issue documents a different symptom (a PHP
warning in core's Ckeditor5Hooks.php during module installation) rather than
this runtime crash.
<h3>Steps to reproduce</h3>
1. Install Drupal 11.4.0 with the AI module suite, including ai_ckeditor.
2. Configure an AI provider and add the Tone (or Summarize) tool to a text
format's CKEditor 5 toolbar.
3. Edit content using that text format, select some text, and open the Tone
(or Summarize) tool from the CKEditor AI menu.
<h3>Actual result</h3>
Browser console shows:
<code>
toolbarview-item-unavailable
/api/ai-ckeditor/dialog?_wrapper_format=drupal_modal:1
Failed to load resource: the server responded with a status of 500
Uncaught Drupal.AjaxError
</code>
Server logs (watchdog) show:
<code>
Error: Call to a member function get() on null in
Drupal\ai_ckeditor\AiCKEditorPluginBase->buildCkEditorModalForm()
(line 214 of
.../modules/contrib/ai/modules/ai_ckeditor/src/AiCKEditorPluginBase.php).
#0 .../ai_ckeditor/src/Plugin/AiCKEditor/Tone.php(149):
Drupal\ai_ckeditor\AiCKEditorPluginBase->buildCkEditorModalForm()
#1 .../ai_ckeditor/src/Form/AiCKEditorDialogForm.php(134):
Drupal\ai_ckeditor\Plugin\AiCKEditor\Tone->buildCkEditorModalForm()
#2 [internal function]:
Drupal\ai_ckeditor\Form\AiCKEditorDialogForm->buildForm()
... (full core FormBuilder / EarlyRenderingControllerWrapperSubscriber /
HttpKernel stack follows in both reports)
</code>
<h3>Environment</h3>
<code>
Drupal 11.4.1
A custom subtheme Bootstrap5 (Bootstrap5 v4.05)
Apache/2.4.62 (Win64) OpenSSL/3.0.15 mod_fcgid/2.3.9
PHP 8.3.26
PHP Memory limit: 512M
MySQL 8.4.3
PHP Caching module: OpCache
</code>
issue