Skip to content

[6.x] Losing data when creating new entries inside an entry #12897

@tao

Description

@tao

Bug description

I have a collection called sections and the blueprint allows me to create and attach a list of subsections entries to it:

title: Section
tabs:
  main:
    display: Main
    sections:
      -
        fields:
          -
            handle: title
            field:
              type: text
              required: true
              localizable: true
              validate:
                - required
          -
            handle: subsections
            field:
              collections:
                - subsections
              type: entries
              display: Subsections
              localizable: false

When I am viewing the subsection History for example, and I use the button Create Entry it opens the slider and I try create a new entry like Photos... it looks like it works, it actually creates the subsection Photos in the content folder.

But when I hit the Save & Publish button it renames my section History -> Photos and doesn't attach the subsection.

How to reproduce

Here's the subsection blueprint too:

title: Subsection
tabs:
  main:
    display: Main
    sections:
      -
        display: Content
        fields:
          -
            handle: title
            field:
              type: text
              required: true
              localizable: true
              validate:
                - required
          -
            handle: content
            field:
              type: markdown
              localizable: true
      -
        display: 'New Section'
  sidebar:
    display: Sidebar
    sections:
      -
        fields:
          -
            handle: slug
            field:
              type: slug
              localizable: true
              validate: 'max:200'

Both entries have slugs: false enabled on the collection it that might be causing an issue, but otherwise it's a brand new Statamic site for testing.

Logs

Environment

Statamic
Addons: 0
Sites: 28 (English, Arabic, Bulgarian, and 25 more)
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 6.0.0-alpha.15 PRO

Installation

Existing Laravel app

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions