Error contentLib.create

Enonic version: 6.5.1
OS: Ubuntu 15.10


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




    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:

        <field-set name="example-info">

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


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.