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

NPE when area as no availableComponents

    XMLWordPrintable

Details

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

    Description

      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
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

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