Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-249

Definitions app not opening up after migrating to 5.6.3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.2.1
    • None
    • None
    • None
    • invesco.com
    • Basel 139
    • 3

      In SUPPORT-8497, there are few cases that 'upgraded to 5.6.3 from 5.6, "Definitions" app is not opening up and throwing an error in the back end, attached is the debug log for this action.'
      The NPE caused by
      {{ DefinitionMetadata metadata.getConfigurationSourceType().name() }}
      Could be after migration, we lack of definition source type somewhere or customer has a custom implementation which didn't set any value to that field.
      Error in
      https://git.magnolia-cms.com/projects/MODULES/repos/definitions-app/browse/src/main/java/info/magnolia/definitions/app/problems/list/ProblemReportListPresenter.java#113
      Fix by null checking such as

      if (itemId instanceof DefinitionProviderId) {
                          final DefinitionProviderId definitionProviderId = (DefinitionProviderId) itemId;
                          final DefinitionMetadata metadata = definitionProviderId.getValue().getMetadata();
                          String type = metadata.getType() == null ? "unknown" : metadata.getType().getName();
                          String sourceType = metadata.getConfigurationSourceType() == null ? "unknown" : metadata.getConfigurationSourceType().name();
                          final Table.GeneratedRow generatedRow =
                                  new Table.GeneratedRow(
                                          String.format(definitionProviderInfoTemplate,
                                                  definitionProviderId.getStyle(),
                                                  type,
                                                  metadata.getReferenceId(),
                                                  sourceType,
                                                  metadata.getLocation()));
                          generatedRow.setSpanColumns(true);
                          generatedRow.setHtmlContentAllowed(true);
      
                          return generatedRow;
                      }
      

      -----------------------
      Proposed solution:

      • add a new 'unknown' source type to your enum and use it in case of missing source type.
      • this issue is not a common issue and should not happen in a new, ideal environment, however we still able to support customers for custom code that lack of setting this info.

        Acceptance criteria

              sgasa Saimir Gasa
              viet.nguyen Viet Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD