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

Definitions app not opening up after migrating to 5.6.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      invesco.com
    • Sprint:
      Basel 139
    • Story Points:
      3

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: