Error contentLib.create

Enonic version: 6.5.1
OS: Ubuntu 15.10

Hi.

I am getting this error when creating a content with data.

Error

"com.enonic.xp.inputtype.InputType.createValue(Lcom/enonic/xp/data/Value;Lcom/enonic/xp/inputtype/InputTypeConfig;)Lcom/enonic/xp/data/Value;",

Code

    var object = {
                parentPath: '/somePath',
                displayName: someVar,
                draft: true,
                contentType: 'com.x:y',
                data: {
                    id: project_id
                },
                x: {},
                page: {},
                attachments: {}
            };

            var objectCreated = contentLib.create(object)
            ....

Content type:

<content-type>
    <display-name>Example</display-name>
    <super-type>base:structured</super-type>
    <allow-child-content>true</allow-child-content>
    <form>
        <field-set name="example-info">
            <label>Example</label>
            <items>

                <input type="TextLine" name="id">
                    <label>id</label>
                    <occurrences minimum="0" maximum="1"/>
                </input>

            </items>
        </field-set>
    </form>
</content-type>

If I do not specify id: project_id and the data is passed empty the content is created without any problem.

What could it be ?

Thx in advance.

I think this might be related to an issue that was fixed on 6.5.2 .
You should upgrade to 6.5.2, there are no compatibility changes when coming from 6.5.1, just bugfixes.

Spot on!

Upgrading to 6.5.2 solved this problem, however “contentLib.modify” function is not working properly.

I can see that the content was modified because the status changed to Out-of-date and I can see that the new value is added to the attribute (“projects”: 82e4… added). When I publish this content the attribute that was added goes away for some reason.



What could it be ?

Thx in advance.