[ 
http://jira.magnolia-cms.com/browse/MGNLSTK-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26331#action_26331
 ] 

Ernst Bunders edited comment on MGNLSTK-564 at 2/3/10 11:28 AM:
----------------------------------------------------------------

I created a fix for this bug, by extending the 
info.magnolia.module.templatingkit.dam.dialog.DialogDAM class (the class for 
the Dam dialog control), and add a dummy control with a save handler, that will 
make sure the missing property is set or removed, as required. It only kicks in 
when you have just one dam handler configured.

There are two classes:

nl.vpro.magnolia.module.images.dam.DialogDamSingleHandlerBugfix is the 
DamHandler extension. You probably want to rename this. Set this class as your 
dam handler.

nl.vpro.magnolia.module.images.dam.DamBugfixSaveHandler is the 
fieldSaveHandler. If you renme this, make sure you update the reference in line 
45 of DialogDamSingleHandlerBugfix.

To use it set the config propery 
/config/modules/standard-templating-kit/controls/dam.class = 
nl.vpro.magnolia.module.images.dam.DialogDamSingleHandlerBugfix

If you have some questions, let me know

      was (Author: ebunders):
    I created a fix for this bug, by extending the 
info.magnolia.module.templatingkit.dam.dialog.DialogDAM class, and add a dummy 
control with a save handler, that will make sure the missing property is set or 
removed, as required. It only kicks in when you have just one dam handler 
configured.

There are two classes:

nl.vpro.magnolia.module.images.dam.DialogDamSingleHandlerBugfix is the 
DamHandler extension. You probably want to rename this. Set this class as your 
dam handler.

nl.vpro.magnolia.module.images.dam.DamBugfixSaveHandler is the 
fieldSaveHandler. If you renme this, make sure you update the reference in line 
45 of DialogDamSingleHandlerBugfix.

If you have some questions, let me know
  
> DAM Support does not work if I only have DMS handler
> ----------------------------------------------------
>
>                 Key: MGNLSTK-564
>                 URL: http://jira.magnolia-cms.com/browse/MGNLSTK-564
>             Project: Magnolia Standard Templating Kit
>          Issue Type: Bug
>          Components: controls
>    Affects Versions: 1.2
>            Reporter: Bozidar Ilievski
>            Assignee: Philipp Bärfuss
>         Attachments: singleDamHandlerFix.zip
>
>
> I removed the "upload" handler from the damSupport, so that the Editor can 
> only choose an image from DMS.
> This is what I've done:
> Templating Kit --> Site Definitions --> <my site> --> damSupport --> handlers 
> --> upload.
> I set the "enabled" property of this content node to "false".
> This way, the Editor can only choose an image from DMS (she can not upload it 
> directly).
> If the DAM support is configured like this, with only one handler, the 
> information about the image is not saved correctly.
> For example:
> If the name of the property that stores the image is "myImage", then when 
> there are two handlers, after saving the image, in JCR browser I can see that 
> there are two nodes for the image:
> 1. myImage = dms
> 2. myImageDmsUUID = 766a6d0d-4f96-45d8-a6a6-575bace65636
> But with only one handler in place, all I get after saving the dialog is:
> 1. myImageDmsUUID = 766a6d0d-4f96-45d8-a6a6-575bace65636
> Now when I test for the existence of the "myImage" property in freemarker, I 
> get result that there is no image.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to