Skip to content

Large CP entry edit payload with nested Replicator + Link fields #14664

@davidwittenbrink

Description

@davidwittenbrink

Bug description

After upgrading a project from Statamic 5 to 6, some entry edit pages containing a specific fieldset in the CP became very slow and often end in a blank page/timeout.

The affected entries use a nested Replicator structure (page builder -> table block -> rows -> cells). Each cell has two link field instances (link and documents_link) behind conditionals.

For one failing entry, I analyzed the CP page source and measured the payload:

  • Reconstructed CP source length: ~19mb
  • data-page attribute length: ~19mb (99% of CP source)
  • Decoded data-page JSON length: ~11mb
  • page.props.meta.replicator_blocks size: 11mb (97% of decoded data-page JSON)
  • page.props.values.replicator_blocks size: 121kb

So the payload is dominated by field metadata, not the entry values.

The largest concrete duplication I could verify is repeated nested entry.meta under these paths:

  • page.props.meta.replicator_blocks.existing.<table_block_id>.table.existing.<row_id>.table_cells.existing.<cell_id>.link.entry.meta
  • page.props.meta.replicator_blocks.existing.<table_block_id>.table.existing.<row_id>.table_cells.existing.<cell_id>.documents_link.entry.meta

Counts in this entry:

  • Table blocks: 20
  • Table rows: 126
  • Table cells: 504
  • link.entry.meta occurrences: 504
  • documents_link.entry.meta occurrences: 504
  • Total nested copies: 1,008

All 1,008 entry.meta payloads are identical in this case.

I know there was recent Replicator work in #13427 (improving page-load performance), but this case still reproduces on my setup.
I've also brought this up on Discord here.

Here is a meta.json field showing the duplicated metadata object inside page-json
meta.json

How to reproduce

  1. Use Statamic 6.18.1 (or current 6.x).
  2. Create a blueprint with nested Replicators or add the ones I attached:
    • top-level block Replicator
    • table block containing row Replicator
  3. In each cell, define two type: link fields (link, documents_link) with conditional visibility.
  4. Create an entry with many table cells (example failing entry: 20 table blocks, 126 rows, 504 cells, many links populated).
  5. Open the entry edit page in the CP.
  6. Inspect page source: data-page payload is very large and mostly props.meta.replicator_blocks.

blocks.yaml
table.yaml

Logs

Environment

Environment
Laravel Version: 13.4.0
PHP Version: 8.5.5
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: Europe/Vienna
Locale: en

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

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: microsoft-graph
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 2
License Key: Not set
Sites: 7 (German, Romanian, Czech, and 4 more)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 6.18.1 PRO

Statamic Addons
mia/statamic-image-renderer: 2.0.0
withcandour/aardvark-seo: 6.0.2

Installation

Other (please explain)

Additional details

No response

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