Skip to content

[V16] - Preset values/saving values doesn't work properly in compositions #19676

@MiguelGuedelha

Description

@MiguelGuedelha

Which Umbraco version are you using?

16.0.0

Bug summary

When using a document type that contains compositions, the fields inside said compositions if they have preset/default values, dont have said values saved into the CMS when saving/publishing the content

Specifics

No response

Steps to reproduce

Fresh install of Umbraco 16

Create:

  1. Toggle type with preset value as true/enabled
  2. Slider type with min value 0, max value 1, step value 0.1 and starting/preset value 0.5

Create a composition with fields contain one of each data type (add them to a "Composition" tab):

  1. Default toggle data type
  2. Custom created toggle with default true
  3. Custom created slider

Now create a document type that is allowed to be created as a root node and:

  1. Add the composition to it
  2. Re-create the same exact fields as the composition, but on the document type itself, in a separately named tab for ease of distinction

Create the document type and save it without touching any of the inputs/fields

Expected result / actual result

Expected result:

  1. Both the composition and the direct fields should take their preset values

Actual results:

  1. Direct fields take preset values correctly
  2. Composition fields don't take preset values and are then null in their respective published content access (Delivery api, etc)

This item has been added to our backlog AB#54968

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions