[AMPLIENCE-3] It's possible to save non images in the field Created: 18/Nov/21  Updated: 16/Dec/21  Resolved: 01/Dec/21

Status: Resolved
Project: Amplience DAM Connector
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Neutral
Reporter: Brandon Murdoch Assignee: Raphael Falvo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File 400-add-image-error.mov     File choose_button_only_available_on_assets.mov    
Template:
Acceptance criteria:
Empty
Date of First Response:
Story Points: 4

 Description   

Steps to reproduce

  1. Create a amplience field
  2. Select a none image (I.E a folder)
  3. Save the dialog

Expected results

You shouldn't be able to 'choose' a folder to save - but you should be able to navigate into folders

Actual results

You can select / save folders

Workaround

Development notes



 Comments   
Comment by Raphael Falvo [ 25/Nov/21 ]

Not able to reproduce the issue after fixing AMPLIENCE-2, AMPLIENCE-4 and AMPLIENCE-5, as per attached video (choose_button_only_available_on_assets.mov) the choose button appears only when an asset is choosen, not on folders.

Comment by Joe Fallon [ 30/Nov/21 ]

This still happens but now you can't save folders as images.

You are still able to save non-images as an image (mp4 etc). The dialog is saveable and the Image location displays the stock image

Comment by Raphael Falvo [ 01/Dec/21 ]

Hi jfallon , bmurdoch 

With next amplience module release, you will be able to filter the assets displayed in the tree.

To get only the images, add the following entry in module yaml config file (the one where all the amplience connection details are defined):

filter: "type:image"

Comment by Joe Fallon [ 06/Dec/21 ]

You can no longer save non-images, as intended. 

 

However, when you try to you get a 400 pulse notification error rather than an in dialog error.

 

Reproducible steps:

  • Open the ampliance browser
  • Select a non image
  • Save the non-image in the ampliance browser
  • Verify file is not an image in the format column
  • Click save change in the dialog

 

Expected outcome: A warning pops up within the dialog telling the user they can't use a non image

Actual outcome: a 400 pulse error displays whenever the user tries to save the non-image. 

 
RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
caused by InvocationTargetException
caused by MethodException: Invocation of method buttonClick in info.magnolia.ui.dialog.ActionButton$$Lambda$1797/2135986425 failed.
caused by RuntimeException: info.magnolia.ui.api.action.ActionExecutionException: Action execution failed for action: commit
caused by ActionExecutionException: Action execution failed for action: commit
caused by BadRequestException: HTTP 400 Bad Request

Comment by Raphael Falvo [ 06/Dec/21 ]

Hello jfallon ,

The solution provided to solve this ticket was a way to add a filter to get only the images in the browser list. But for that you need an extra configuration in the module yaml config file. Have you tried it ?

 

To get only the images, add the following entry in module yaml config file (the one where all the amplience connection details are defined):

filter: "type:image"

Comment by Raphael Falvo [ 09/Dec/21 ]

Last release fixed the following :

  • Disables Choose button on folders
    (this unwanted behaviour came back when removing Upload buttons)
  • Fixing load/save of amplienceLinkField when using asset from Magnolia DAM
Comment by Joe Fallon [ 10/Dec/21 ]

I can confirm this is now fixed. 

Generated at Sun Feb 11 23:11:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.