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

Class should take precedence over $type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 6.2.19
    • None
    • None
    • magnolia-personalization-pages
    • Yes
    • Nucleus 9
    • 3

      Steps to reproduce

      1. Start Magnolia 6
      2. Check the startup-logs
      3. See the following warning: 
        WARN  a.config.resolver.AnnotationProcessingTypeResolver: Encountered the '$type' property but failed to resolved the type from its value: [{}]. Available types: [jcrStatusColumn,variantAwareNameColumn,enumColumn,iconColumn,referredColumn,unhtmlColumn,columnComponent,jcrTypeColumn,iconAndValueColumn,koosCountColumn,jcrTitleColumn,jcrPathColumn,dateOnlyColumn,dateColumn] 
        
        

      Also check line 271 of info/magnolia/map2bean/Map2BeanTransformer.java and line 139 of info/magnolia/config/resolver/AnnotationProcessingTypeResolver.java

      The reason why it fails, is that in info/magnolia/personalization/magnolia-personalization-pages/2.0.15/magnolia-personalization-pages-2.0.15.jar!/personalization-pages/decorations/pages-app/apps/pages-app.yaml we have the following piece of configuration:

      (...)
      workbench:
        contentViews:
          tree:
            columns:
              jcrName:
                $type: !override
                class: info.magnolia.pages.app.browser.column.CachingVariantAwareTitleColumnDefinition
      (...) 

      Apparently, this is not the way to replace $type with another class; it reports an empty type.

      Expected results

      No warning should be logged on startup

      Actual results

      The logs are spammed with 50+ warnings

      Workaround

      -

      Development notes

        Acceptance criteria

              rkovarik Roman Kovařík
              t.i.molenaar Tim Molenaar
              Nucleus
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved:

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