Skip to content

Control panel freezes when a conditionally hidden grid with min_rows has an asset field #15428

Description

@lukeagsmith

Bug description

When a grid has min_row: 1 and has an asset field in that row, and the whole grid is conditionally hidden, hitting save causes the control panel to freeze with console errors.

Image

I'm aware of #15427 just posed but wanted to report this as there are no default values being set. (Possibly the min_rows setting is equivalent to having a default value here?)

How to reproduce

It be reproduced with the following paired down blueprint

title: test
tabs:
  main:
    display: Main
    sections:
      -
        fields:
          -
            handle: title
            field:
              type: text
              required: true
              validate:
                - required
          -
            handle: radio_field
            field:
              options:
                -
                  key: hide
                  value: Hide
                -
                  key: show
                  value: Show
              type: radio
              default: hide
              display: 'Radio Field'
          -
            handle: grid_field
            field:
              type: grid
              display: 'Grid Field'
              if:
                radio_field: 'equals show'
              min_rows: 1
              fields:
                -
                  handle: assets_field
                  field:
                    container: assets
                    type: assets
                    display: 'Assets Field'

Saving the entry works on first save, but then every save after that with the grid field hidden causes the control panel to freeze.

Saving with the grid field showing works.

Logs

Environment

Environment
Laravel Version: 13.30.1
PHP Version: 8.4.23
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.31.0 Solo

➜  v6 herd php please support:details

Environment
Laravel Version: 13.30.1
PHP Version: 8.5.8
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.31.0 Solo

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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