Undefined array key "tone_prompt" on AI Content Suggestions settings form

Created on 30 June 2025, 2 days ago

Problem/Motivation

Getting the following warning when saving the AI Content Suggestions settings with "Alter tone" enabled:
Warning: Undefined array key "tone_prompt" in Drupal\ai_content_suggestions\Plugin\AiContentSuggestions\Tone->saveSettingsForm() (line 270 of modules/contrib/ai/modules/ai_content_suggestions/src/Plugin/AiContentSuggestions/Tone.php).

And on config export, the value of the prompt setting for tone is changed to null

Steps to reproduce (required for bugs, but not feature requests)

Please provide information like AI modules enabled, which AI provider, browser, etc.
1. Enable AI Content Suggestions module
2. Go AI Content Suggestions settings page
3. Enable the Alter form setting
4. Save the form
5. Observe the warning

Proposed resolution

Remaining tasks

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes

🐛 Bug report
Status

Active

Version

1.1

Component

AI Content Suggestions

Created by

🇺🇸United States heatherwoz Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024