[MGNLSTK-682] Dam control does not save images when used with Data module Created: 31/Aug/10  Updated: 04/Dec/13  Resolved: 01/Sep/10

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: controls
Affects Version/s: 1.3.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Ondrej Chytil
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia version 4.3.5 STK 1.3.3


Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

I'm reporting an issue we found during consulting at Namics. In short, they would like to use the dam control within the data module to choose an image either from file system or from the documents repository. These are the steps to reproduce the bug.

1) go to Configuration/data/dialogs/Contact/personalTab/photo and change the control type from file to dam
2) then go to Data/Contacts/ and edit the JMustermann details. You will see that the dam control is actually there.
3) choose either an image from the file system or the doc repo, it makes no difference.
4) when you try to save it you get a blank dialog and the image is not saved.

The class implementing the dam control is

info.magnolia.module.templatingkit.dam.dialog.DialogDAM

.

This is a rather urgent issue as they planned to go live in a couple of weeks.



 Comments   
Comment by Jan Haderka [ 01/Sep/10 ]

What happens here is not specific to the data module. The problem is that you are changing type of the existing control to format of the data that is not supported by such control. In such case, you should also migrate all existing instances of given data (in this case, delete the photo node from JMusstermann details. If you delete the offending binary node data, editing will work as expected. Also please note that the error message is logged in this case:

2010-09-01 12:25:00,065 ERROR info.magnolia.cms.servlets.MVCServletHandlerImpl:
can't call command: save
java.lang.UnsupportedOperationException:
This operation is not supported on node datas of type BINARY

The error should still be propagated back to the user to make it obvious why dialog can't be saved.

Comment by Philipp Bärfuss [ 01/Sep/10 ]

Its a bit hard to understand and I try to explain it in different words. If you use a DAM control with the name myImage, the nodedata myImage will contain the name of selected DAM source (binary, dms, simple media, ..), the uuid of the referenced image - in case of DMS - is stored in additional nodedatas like myImageDmsUUID.

I am closing the issue. Either we create a new one for the error message or wait till 5.0 which will show this messages to the user/developer.

Generated at Mon Feb 12 07:29:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.