- Issue created by @penyaskito
- 🇳🇿New Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .
- First commit to issue fork.
- Merge request !11695Issue #3515869: Improved delta error message in SectionListTrait → (Open) created by Unnamed author
Hi @quietone this is my first contribution to Drupal. I've updated the SectionListTrait delta error message to be more descriptive by including available deltas and section count. Please let me know if any adjustments are needed - I'm happy to refine this further.
@penyaskito Thank you for the feedback! I've implemented the simplified error message as suggested.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
Tested this with my MR at ✨ Provide a Config Action to add/edit a component in a layout Active and the error message is "Invalid section delta "10", there are 2 sections." as expected
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
We have a test at
Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest
depending on the error message. I have updated the error message in the test to $this->expectExceptionMessage('Invalid section delta "2". There are 2 sections.'); Ready for review..
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
There's some code standards failing on the test file. I'm guessing your editor is trying to autoformat something that it shouldn't.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
Simple change, tests passing.