-
-
Notifications
You must be signed in to change notification settings - Fork 617
Description
Bug description
When a markdown field is inside a replicator set (without an asset container configured), the field is not rendered in the Control Panel.
The browser console shows:
TypeError: Cannot read properties of null (reading 'assets') at Proxy.container (MarkdownFieldtype-….js)
Expected: The markdown field renders normally.
Root cause: In resources/js/components/fieldtypes/markdown/MarkdownFieldtype.vue, the container() and assetSelectorColumns() computed properties access this.meta.assets without optional chaining on meta:
container() {
return this.meta.assets?.container; // crashes if this.meta is null
},
assetSelectorColumns() {
return this.meta.assets?.columns; // same issue
},
When a markdown field is inside a replicator, Field.vue resolves meta via data_get(containerMeta, path), which defaults to null (not undefined). Since null overrides the Vue prop default {}, this.meta ends up as null.
Fix: Add optional chaining on meta:
container() {
return this.meta?.assets?.container;
},
assetSelectorColumns() {
return this.meta?.assets?.columns;
},
Tested locally, this resolves the issue.
How to reproduce
- Create a blueprint with a replicator
- Inside that replicator, add a set containing a markdown field (no asset
containerconfigured on the field) - Create or edit an entry using that blueprint in the CP
- Open the browser developer console
- The markdown field is not displayed; the TypeError appears in the console
Logs
Environment
Application Name: My Site
Laravel Version: 12.53.0
PHP Version: 8.4.19
Composer Version: 2.9.5
Environment: local
Debug Mode: OFF
URL: my-site.test
Maintenance Mode: OFF
Timezone: UTC
Locale: fr
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: sqlite
Logs: daily
Mail: smtp
Queue: redis
Session: file
Livewire
Livewire: v4.2.0
Statamic
Addons: 6
Sites: 3 (MySite FR, MySite EN, CMS)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 6.3.3 PRO
Statamic Addons
alt-design/alt-redirect: 1.7.0
aryehraber/statamic-logbook: 4.0.0
marcorieser/statamic-livewire: 5.2.1
mitydigital/statamic-google-fonts: 2.1.3
statamic/seo-pro: 7.1.0
stillat/relationships: 2.3.0Installation
Existing Laravel app
Additional details
The bug is present on the 6.x branch on GitHub (still unfixed as of 2026-03-18). It also affects v6.5.0 and v6.7.0.
The issue likely also affects the Bard fieldtype which uses a similar pattern.