Validation issue when editing with ez 4.1

Author Message

Hakim Bouras

Friday 14 August 2009 8:41:09 am

Hi,

I am trying to migrate to 4.1 and I get the following error when I edit objects which have mandatory fields that does not appear in the template :

The information could not be saved because of the following problems:
    * User account: Input required.
    * Creation Date: Missing datetime input.

These fields are not available in the template (which only propose a subset of all the class fields), because they are not supposed to be changed by the end user updating their info.

I am using the same templates that were working fine from 3.6 untill 4.0.

Any idea about what I might do wrong or how I could manage this problem ?

Thanks for your help,
Hakim

André R.

Friday 14 August 2009 10:50:07 am

In 4.1 and up these are now required if the attribute is required, security(so users can't just remove input fields in the dom to circumvent validation)..
So you'll need to change your template that omit them and use hidden input elements for them instead.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Hakim Bouras

Saturday 15 August 2009 8:36:28 am

Thanks Andre for your answer.

I understand why it was not working anymore.

Is there a way to programatically fill the missing fields (maybe through the workflow) before the validation process takes place (so that I can keep a "light" template) ?

Is there a place where we can have some information about when (in the workflow) and how the validation process takes place when we use templates to update objects ?

Thanks for your help,
Hakim

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.