Validation image fields

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Validation image fields

Roberto van der Linden
Hello,

We have created our own imageset with some extra required fields. When we upload an image, the editor does not open in edit mode but in view mode. This means that we have created an image with all empty required fields. When we open the document and trying to save it, we do get the validation errors, but the field and label of the field are not highlighted in red.

So we have two issues:

1. Document is created with empty required fields after upload.
2. Validation is not shown correctly.

Is there a way to change this?

Cheers,
Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Validation image fields

Mathijs den Burger
Hi Roberto,

Regarding issue 2: you're probably missing some configuration. Please
check that you have the following properties set in your imageset
document type (note the 'validator.id' values):

/hippo:namespaces/yournamespace/yourimageset/hipposysedit:nodetype/hipposysedit:nodetype/yourrequiredfield
- validators = non-empty, required

/hippo:namespaces/yournamespace/yourimageset/editor:templates/_default_
- references = engine, wicket.model, model.compareTo, validator.id
- services = wicket.id, validator.id

/hippo:namespaces/yournamespace/yourimageset/editor:templates/_default_/yourrequiredfield
- validator.id = ${validator.id}

On issue 1: I think you need a custom gallery processor for this. If
the required fields can have some sensible default values you could
set the default values in your custom gallery processor. Otherwise the
custom gallery processor could open all the uploaded images for
editing after they've been uploaded, so the user can enter values for
all required fields. Opening the image editor can be done via an
IBrowseService; see the method GalleryWorkflowPlugin#select for an
example.

hope this helps,
-Mathijs


On Mon, Jan 23, 2012 at 1:25 PM, Roberto van der Linden
<[hidden email]> wrote:

> Hello,
>
> We have created our own imageset with some extra required fields. When we
> upload an image, the editor does not open in edit mode but in view mode.
> This means that we have created an image with all empty required fields.
> When we open the document and trying to save it, we do get the validation
> errors, but the field and label of the field are not highlighted in red.
>
> So we have two issues:
>
> 1. Document is created with empty required fields after upload.
> 2. Validation is not shown correctly.
>
> Is there a way to change this?
>
> Cheers,
> Roberto
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Validation-image-fields-tp7216087p7216087.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Validation image fields

Kenan Salic
Could also depend on which CMS version you are using. If you are using anything before 2.20.03 or 2.21.03 it could be this problem:

Fix is included in the issue.

On Tue, Jan 24, 2012 at 1:03 PM, Mathijs den Burger <[hidden email]> wrote:
Hi Roberto,

Regarding issue 2: you're probably missing some configuration. Please
check that you have the following properties set in your imageset
document type (note the 'validator.id' values):

/hippo:namespaces/yournamespace/yourimageset/hipposysedit:nodetype/hipposysedit:nodetype/yourrequiredfield
- validators = non-empty, required

/hippo:namespaces/yournamespace/yourimageset/editor:templates/_default_
- references = engine, wicket.model, model.compareTo, validator.id
- services = wicket.id, validator.id

/hippo:namespaces/yournamespace/yourimageset/editor:templates/_default_/yourrequiredfield
- validator.id = ${validator.id}

On issue 1: I think you need a custom gallery processor for this. If
the required fields can have some sensible default values you could
set the default values in your custom gallery processor. Otherwise the
custom gallery processor could open all the uploaded images for
editing after they've been uploaded, so the user can enter values for
all required fields. Opening the image editor can be done via an
IBrowseService; see the method GalleryWorkflowPlugin#select for an
example.

hope this helps,
-Mathijs


On Mon, Jan 23, 2012 at 1:25 PM, Roberto van der Linden
<[hidden email]> wrote:
> Hello,
>
> We have created our own imageset with some extra required fields. When we
> upload an image, the editor does not open in edit mode but in view mode.
> This means that we have created an image with all empty required fields.
> When we open the document and trying to save it, we do get the validation
> errors, but the field and label of the field are not highlighted in red.
>
> So we have two issues:
>
> 1. Document is created with empty required fields after upload.
> 2. Validation is not shown correctly.
>
> Is there a way to change this?
>
> Cheers,
> Roberto
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Validation-image-fields-tp7216087p7216087.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Validation image fields

Roberto van der Linden
In reply to this post by Mathijs den Burger
Hey Mathijs,

You are right :) I was missing the validator.id values on my template.

The custom gallery processor is something we will try later on.

Thanks for now!

Roberto