- Issue created by @wim leers
- Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - @wim-leers opened merge request.
- Assigned to wim leers
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Now that ๐ KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate Fixed is in, we'd be able to instantly see how much effect this would have. Let's find out!
- last update
over 1 year ago 24,977 pass - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Wow, zero violations, really?! Maybe the violations only occur in functional tests? ๐ค
Verified again locally that this indeed works correctly by changing
core/profiles/standard/config/install/taxonomy.vocabulary.tags.yml
to have a multi-line description and runningStandardTest
. Fails as expected ๐So let's:
- Add explicit test coverage.
- Run the full test suite again.
- last update
over 1 year ago 24,892 pass, 12 fail - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:09pm 27 July 2023 - last update
over 1 year ago 25,008 pass - ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
This needs another rebase it seems. Very suprised that only a few things in core were giving errors on this. Not sure if all the tests have ran on the last time, there is a change in drupalci.yml that needs to be undone.
- Assigned to wim leers
- Status changed to Needs work
over 1 year ago 1:54pm 27 July 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Oops, yes, I forgot about that ๐ Done! Probably hundreds of test failures now ๐
- last update
over 1 year ago 29,916 pass - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 4:36pm 27 July 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Well well โฆ I guess almost nothing in Drupal core uses a multi-line label!
I really thought at least some contact form would trigger this, or a vocabulary description, or a menu description โฆ but no! ๐ฎ
And sure enough, e.g.
core/profiles/demo_umami/config/install/contact.form.feedback.yml
uses a single line! - Status changed to RTBC
over 1 year ago 6:28am 28 July 2023 - ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
This looks great, even better that nothing fails but we still improve strictness.
- Status changed to Needs review
over 1 year ago 5:56pm 28 July 2023 - ๐ซ๐ฎFinland lauriii Finland
Shouldn't we remove the incorrect uses of
type: label
mentioned in the issue summary (or at least have a follow-up to do that)? The UIs for these certainly would enable creating invalid config at the moment. - last update
over 1 year ago 29,905 pass, 2 fail - last update
over 1 year ago 29,945 pass - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
#10: works for me!
Turns out that
taxonomy.vocabulary.*:description
's UI actually does not allow multiple lines. So I'm wrong about that one. ๐
Same forsystem.menu.*:description
! ๐
Both of these are apparently used in listing UIs and that's why they only allow a single line.I am right about
contact.form.*:message
though. And I managed to find one more:field.widget.settings.text_textarea_with_summary:placeholder
.Since there are so few examples: let's fix them here? First pushed failing test coverage, then the fix (i.e. tweaking config schema).
- Status changed to RTBC
over 1 year ago 2:36pm 1 August 2023 - ๐บ๐ธUnited States smustgrave
Change looks good and appears all green.
Question though is if changing to text does that mean it can be translated?
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Question though is if changing to text does that mean it can be translated?
Both
type: label
andtype: text
are translatable already:# Human readable string that must be plain text and editable with a text field. label: type: string label: 'Label' translatable: true โฆ # Human readable string that can contain multiple lines of text or HTML. text: type: string label: 'Text' translatable: true
โ
core.data_types.schema.yml
and:
function config_translation_config_schema_info_alter(&$definitions) { $map = [ 'label' => '\Drupal\config_translation\FormElement\Textfield', 'text' => '\Drupal\config_translation\FormElement\Textarea', 'date_format' => '\Drupal\config_translation\FormElement\DateFormat', 'text_format' => '\Drupal\config_translation\FormElement\TextFormat', 'mapping' => '\Drupal\config_translation\FormElement\ListElement', 'sequence' => '\Drupal\config_translation\FormElement\ListElement', 'plural_label' => '\Drupal\config_translation\FormElement\PluralVariants', ];
๐๐
-
lauriii โ
committed b7ee3dcf on 11.x
Issue #3377030 by Wim Leers, borisson_, smustgrave: Add validation...
-
lauriii โ
committed b7ee3dcf on 11.x
- Status changed to Fixed
over 1 year ago 3:35pm 1 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.