[MGNLPN-632] Empty $type warning at startup Created: 10/May/22  Updated: 19/Oct/22  Resolved: 19/Oct/22

Status: Closed
Project: Magnolia Personalization
Component/s: None
Affects Version/s: 2.0.15
Fix Version/s: 3.0.0, 2.1.7

Type: Bug Priority: Medium
Reporter: Tim Molenaar Assignee: Thuy To
Resolution: Fixed Votes: 0
Labels: nucleus, quickwin
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 4h 50m Time Spent: 4h 50m
Σ Original Estimate: Not Specified Original Estimate: Not Specified
Environment:

magnolia-personalization-pages


Issue Links:
Cloners
clones MAGNOLIA-8368 Class should take precedence over $type Closed
Relates
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLPN-701 QA Sub-task Closed Lam Nguyen Bao  
MGNLPN-702 Port to master Sub-task Completed Thuy To  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: AuthorX Support
Sprint: AuthX 19
Story Points: 0.5
Team: AuthorX

 Description   

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

 the $type: !override can be safely removed and it works 



 Comments   
Comment by Roman Kovařík [ 10/May/22 ]

Discovery:
With MAGNOLIA-8368 in place, the $type: !override can be safely removed.

Generated at Mon Feb 12 06:39:34 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.