Steps to reproduce
- Create a content type with a multiple content attribute
- Add a default value to this attribute like pointing to an unexisting content:
<default-value type="attribute" name="code">WRONG</default-value>
- Try to create or edit a content with this content type
- You get an error message with no link with the real error. It is an NPE at line 237 of org.ametys.cms.data.type.AbstractContentElementType. It is caused by an array with one null element due to org.ametys.runtime.model.DefaultElementDefinition.getDefaultValue()
If the attribute is multiple, we create an array of number of theorical default values.
But our value is null here, so we get an array with a null element.
NB : This case can occur while using other data than the client data or if an element have been deleted.
- is duplicated by
-
CMS-11779 Default value of type attirbute might fails when target is multiple
-
- Closed
-
- testing discovered
-
RUNTIME-3898 Allow multiple config parameters
-
- Open
-
[RUNTIME-3899] Multiple attribute: Default value on unexisting value
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Available for review [ 10005 ] | New: Resolved [ 5 ] |
Status | Original: In Progress [ 3 ] | New: Available for review [ 10005 ] |
Status | Original: Reopened [ 4 ] | New: In Progress [ 3 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Ready to merge [ 10208 ] | New: Resolved [ 5 ] |
Assignee | Original: Cédric Damioli [ cedric ] | New: Caroline Bayle [ cbayle ] |
Status | Original: Functional review OK [ 10207 ] | New: Ready to merge [ 10208 ] |
Status | Original: Available for review [ 10005 ] | New: Functional review OK [ 10207 ] |
Assignee | Original: Caroline Bayle [ cbayle ] | New: Cédric Damioli [ cedric ] |