[MGNLDAM-776] Problem linking to external assets Created: 18/Jan/19  Updated: 17/Dec/19  Resolved: 13/Dec/19

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM External App
Affects Version/s: 1.2.1
Fix Version/s: 2.6.1

Type: Bug Priority: Neutral
Reporter: Alberto Cordero Assignee: Canh Nguyen
Resolution: Fixed Votes: 3
Labels: vaadin8
Remaining Estimate: 2h 56m
Time Spent: 4d 5h 4m
Original Estimate: Not Specified

Attachments: Text File logError.txt     File tours.subApps.detail.yaml    
Issue Links:
Relates
relation
is related to MGNLDAMEXT-39 Update module to work with Vaadin 8 Closed
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:
Epic Link: Support
Sprint: SPA Editor 12
Story Points: 5

 Description   

When I try to link an asset from Amazon S3 I have the error attached. I attach decoration with link configuration. I´m using Magnolia 6.0, dam-external-app 2.5 and amazon connector 1.21. I don´t know if is the correct configuration or it is a bug. 

 

As seen in SUPPORT-10389, this is happening with custom external assets (other than S3), therefore it's not connector related.



 Comments   
Comment by Aleksandr Pchelintcev [ 01/Oct/19 ]

From the quick investigation, I think I know the problematic method:
info.magnolia.ui.workbench.list.ListViewImpl#select:

        // convert to set before comparing with actual table selection (which is also a set underneath)
        Set<Object> uniqueItemIds = new HashSet<>(itemIds);
        if (uniqueItemIds.equals(table.getValue())) {
            // selection already in sync, nothing to do
            return;
        }

        table.setValue(uniqueItemIds);

A non-null value is unquestionably wrapped into a set and may be passed to the table. The fact the table might be non-multiselect is not checked (and choosers are forcibly single-select flavoured). I think other cases work, cause they halt on the {{ if (uniqueItemIds.equals(table.getValue()))}} - I'd expect an empty set to be compared with another empty set (which will yield true). Why that condition doesn't trigger for the case of S3 chooser - is a good question. Nevertheless, we need to do some sanitation and pick only the first value (???) if the grid is not multiselect.

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