Uploaded image for project: 'Definitions App'
  1. Definitions App
  2. CFGUI-77

NPE when area as no availableComponents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Neutral Neutral
    • None
    • 1.1.3
    • None
    • Yes

      Problem

      When a template definition defines an area with no available components, then the "problems" sub app of the definition app will not start up, because of an NPE in TemplateDefinitionValidator line 97. areaDefinition.getAvailableComponents() returns null here, but it's not checked.

      Especially a class like the TemplateDefinitionValidator should be very robust towards invalid or senseless template definitions.

       

      Testcase

      This template definition will crash the definitions app:

      class: info.magnolia.module.site.templates.PageTemplateDefinition
      
      renderType: site
      type: feature
      
      parameters:
        allowedSubTemplates:
      
      areas:
        main:
          type: list
          availableComponents:
        footer:
          editable: false
      

        Acceptance criteria

              mdivilek Milan Divilek
              will Will Scheidegger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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