We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content type schema:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <content-type> <display-name>Date</display-name> <super-type>base:structured</super-type> <form> <input name="date" type="Date"> <label>Date</label> <indexed>true</indexed> <occurrences minimum="1" maximum="1"/> <default>2000-01-01</default> </input> </form> </content-type>
Create new content of this type:
var contentLib = require('/lib/xp/content'); var content = contentLib.create({ name: 'myContent', parentPath: '/', displayName: 'My Content', contentType: 'com.enonic.app.mytype:date', data: { "date": "2020-06-02" } });
Here we explicitly say that the new content should have value 2020-06-02 in the date field, but content is still created with default value 2000-01-01
date
The text was updated successfully, but these errors were encountered:
NB! Check if we have this problem for other input types where we support default values as well.
Sorry, something went wrong.
Default value from schema overwrites explicit property value in lib-c…
e789836
…ontent.create() #8149
de4cfbc
fe9b0f9
c3be3e5
I verified this bug manually. I am planning to add ui-test for this bug
vbradnitski
No branches or pull requests
Content type schema:
Create new content of this type:
Here we explicitly say that the new content should have value 2020-06-02 in the
date
field, but content is still created with default value 2000-01-01The text was updated successfully, but these errors were encountered: