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

Setting a property to null via YAML configuration should report a problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.1
    • None
    • None
    • None
    • Yes
    • Yes
    • Features 6
    • 3

      Thanks to mchruscielewski in SUPPORT-8899, "availableComponents" field but has no subfields in yaml area definition caused NPE.
      Sample config:

      templateScript: /website/templates/components/pages/globalcoverage/country_overview.ftl 
      renderType: freemarker 
      title: Global coverage - country overview 
      areas: 
        countries: 
          type: list 
          renderType: freemarker 
          availableComponents: 
      

      First round investigation from customer:

      info.magnolia.rendering.template.registry.validator.TemplateDefinitionValidator
      
      protected void validateArea(DefinitionProvider<TemplateDefinition> definitionProvider, Collection<Problem> problems, String rootPath, AreaDefinition areaDefinition) {
      
      areaDefinition.getAvailableComponents().forEach((componentName, componentAvailability) -> { ... }
      

      caused NPE.

        Acceptance criteria

              mdivilek Milan Divilek
              viet.nguyen Viet Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Time Spent - 1h 8m Remaining Estimate - 11m
                    11m
                    Logged:
                    Time Spent - 1h 8m Remaining Estimate - 11m
                    1h 8m