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
-