Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6705

Includes shouldn't be considered valid definitions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Workaround exists
    • Icon: Neutral Neutral
    • None
    • 5.4.7
    • configuration

      Currently, includes are collected as much as any "real" definitions into the registries, e.g. for the mtk:components/linkSwitchableField dialog.

      However, in the case above, the root definition is a FieldDefinition; it can be transformed by map2bean successfully, and will claim thus to be "valid", however, a #get() call on such provider will throw a ClassCastException, the resolved bean type being incompatible with the provider's generic type.

      Considering all definitions should match the registry's declared type to be deemed valid—that's a step we don't have atm—this should apply to includes as well.
      If we ever want to denote the included file is valid YAML, that's a different sense of validity, not that of the definition provider.

        Acceptance criteria

              Unassigned Unassigned
              mgeljic Mikaël Geljić
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD