[MGNLDAM-1037] Exception when trying to open content item whose asset was deleted Created: 28/Mar/22  Updated: 04/Aug/22  Resolved: 27/Jun/22

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0.16, 3.1.0
Fix Version/s: 3.1.0, 3.0.18

Type: Bug Priority: Critical
Reporter: Christopher Zimmermann Assignee: Jesus Alonso
Resolution: Fixed Votes: 0
Labels: authx
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 1h 23m Time Spent: 1h 23m
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLDAM-1043 Coding Sub-task Closed Jesus Alonso  
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:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: AuthorX Maintenance
Sprint: AuthX 12
Story Points: 1
Team: AuthorX

 Description   

Authors can no longer open (and therefore) edit or read a content item whose asset has been deleted.

To reproduce:

Upload an image in Assets app.

Create item in content app with an asset property. And select the uploaded image and save.

Delete the image from within the Assets app.

Try to edit the item in the content item.

Expected:

I can edit and the asset property shows that the asset is missing.

Actual:

Get an exception and cannot open the item.

 

Sub-app failed to start: detail


Message: Invocation of method selectionChange in com.vaadin.ui.ComboBox$$Lambda$2450/0x00000001013f4040 failed.. Stack trace: com.vaadin.event.ListenerMethod$MethodException: Invocation of method selectionChange in com.vaadin.ui.ComboBox$$Lambda$2450/0x00000001013f4040 failed. at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:726) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:399)

 

Note:

I have only tested on SaaS. Problem should be fixed on SaaS - and if it happens on OnPrem as well it also be fixed there.. Might be general issue with external-assets.




 Comments   
Comment by Jesus Alonso [ 08/Jun/22 ]

Got this error

Caused by: java.lang.IllegalArgumentException: Could not resolve property mimeType from class info.magnolia.external.dam.s3.datasource.S3Asset
    at info.magnolia.dam.app.data.AssetPropertySetFactory$Definition.lambda$getGetter$b3446bcf$1(AssetPropertySetFactory.java:119) ~[magnolia-dam-app-3.0.16-SNAPSHOT.jar:?]
    at info.magnolia.ui.preview.AbstractItemPreviewComponent.lambda$refreshItemDetail$1(AbstractItemPreviewComponent.java:112) ~[magnolia-ui-framework-6.2-SNAPSHOT.jar:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_281]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_281]
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_281]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_281]
    at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[?:1.8.0_281]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_281]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_281]
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_281]
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_281]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_281]
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_281]
    at info.magnolia.ui.preview.AbstractItemPreviewComponent.refreshItemDetail(AbstractItemPreviewComponent.java:113) ~[magnolia-ui-framework-6.2-SNAPSHOT.jar:?]
    at info.magnolia.ui.preview.AbstractItemPreviewComponent.lambda$onValueChange$0(AbstractItemPreviewComponent.java:97) ~[magnolia-ui-framework-6.2-SNAPSHOT.jar:?]
    at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_281]
    at info.magnolia.ui.preview.AbstractItemPreviewComponent.onValueChange(AbstractItemPreviewComponent.java:96) ~[magnolia-ui-framework-6.2-SNAPSHOT.jar:?]
    at info.magnolia.dam.app.field.link.DamItemPreviewComponent.onValueChange(DamItemPreviewComponent.java:143) ~[magnolia-dam-app-3.0.16-SNAPSHOT.jar:?]
    at info.magnolia.dam.app.field.link.DamItemPreviewComponent.onValueChange(DamItemPreviewComponent.java:85) ~[magnolia-dam-app-3.0.16-SNAPSHOT.jar:?]
    at info.magnolia.ui.field.AbstractLinkField.lambda$setContentPreview$8978ce21$1(AbstractLinkField.java:168) ~[magnolia-ui-framework-6.2-SNAPSHOT.jar:?] 

Probably it worths fixing globally instead of at connector level.

Generated at Mon Feb 12 05:05:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.