fix: #3591876 Fall back to first region when the AI names a region that does not exist
Fixes #3591876: the Canvas AI page builder throws Region "%s" not found in layout and discards the whole AI build when the LLM names a region that does not exist on the entity's layout. This falls back to the first available region instead, and only throws when the layout has no regions at all.
AI usage disclosure (per the Drupal AI policy): AI-Generated: Yes. Drafted with AI (Claude) assistance, reviewed and tested by Rajab Natshah.
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release
Edited by Rajab Natshah