[MGNLCT-147] Property type "asset" crashes content apps Created: 22/May/20  Updated: 15/Jun/20  Resolved: 15/Jun/20

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: 1.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Chris Jennings Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: 621
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File asset_stacktrace.txt     File event.yaml     File events.yaml    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Story Points: 0.5

 Description   

Verify that issue is resolved after latest fixes in UI

Adding a property of type "asset" to a content type results in an un-saveable dialog in the detail subapp of a generated content app.

I have attached an example type and app. With no asset selected, the item can be saved. When an asset is selected, the item cannot be saved and produces the attached stacktrace.



 Comments   
Comment by Richard Gange [ 22/May/20 ]

See AppWithContentType.java

I think it should be:

private static final Map<String, String> FIELD_TYPE_MAPPING = ImmutableMap.of(
        "date", "dateField",
        "richtext", "richTextField",
        "boolean", "checkBoxField",
        "asset", "damUploadField");
Comment by Viet Nguyen [ 02/Jun/20 ]

From chris.jennings for a work around of this issue:

1. Remove the asset type from the content type.
eg. https://git.magnolia-cms.com/users/ukusergroup/repos/mug-2-20190529/browse/lightmodules/mug-uk-headless-examples-light-module/contentTypes/event.yaml?at=update-621#30

2. Add a link field to the content app you are using.
eg. https://git.magnolia-cms.com/users/ukusergroup/repos/mug-2-20190529/browse/lightmodules/mug-uk-headless-examples-light-module/apps/eventsWithCustomDialog.yaml?at=update-621#16

Comment by Robert Šiška [ 15/Jun/20 ]

Fixed by MGNLUI-5913 and MGNLUI-5711.

Generated at Mon Feb 12 00:37:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.