Skip to content

xsd validation fails on etc/adminhtml/system.xml files that contain comments below field items. #39148

Open
@gwharton

Description

@gwharton

Summary

xsd validation fails on etc/adminhtml/system.xml files that contain <comments> below <field> items.

Examples

Launch PHPStorm and setup xsd validation, as per Magento devdocs.
Browse to a file containing a <comment> as a child to a <field>. Theres plenty to choose from
image
Check out the definition in the xsd file vendor/magento/module-config/etc/system_file.xsd
image
Notice that comment is not defined as a string.
Verify that on Experience League (https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/files/config-reference-systemxml), using <comment> as a child of <field> is supported. It is used extensively throughout Magento backend.
image

Proposed solution

Its an annoyance. Its been around for years. Its time to fix it.

Update type of comment to be string.

Release note

XSD validation now accepts <comment> entries as children of <field> entries in system.xml config files.

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: FrameworkComponent: XmlIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions