Bug description
When you create a group and give it a condition of show when, you can no longer access the data if a child precedes it.
- Introduced in V5
- Not tested in other blueprints, only navigation ones
Copy the data below and try re-ordering them inside your navigation to see what I mean.
How to reproduce
inside antlers:
<divclass="p-10 bg-blue-100">
{{ nav:test }}
{{ title }}
<divclass="p-10 m-10 bg-red-200">
{{ children }}
{{ title }}
<spanclass="block text-xs rounded-full bg-slate-200">
Type: {{ type }}
</span><spanclass="block text-xs rounded-full bg-slate-200">
Columns: {{ test_group.columns }}
</span><spanclass="block text-xs rounded-full bg-slate-200">
Rows: {{ test_group.rows }}
</span><spanclass="block text-xs rounded-full bg-slate-200">
Text: {{ test_text }}
</span>
{{ /children }}
</div>
{{ /nav:test }}
</div>
content/navigation/test.yaml
content/trees/navigation/default/test.yaml
tree:
-
id: 2a92b97a-81c7-45c3-8ac5-51abcfbe2c62title: Homechildren:
-
id: 93d23cc8-7634-43bc-95b9-b3b934e64468title: 'Group 1'data:
type: rowtest_text: null
-
id: 9b22f158-4c69-4e03-9be1-181e3fa2fe7dtitle: 'Group 2'data:
type: columntest_group:
columns: '2'rows: Twotest_text: 'Group 2'
resources/blueprints/navigation/test.yaml
tabs:
main:
display: Mainsections:
-
fields:
-
handle: typefield:
options:
column: Columnrow: Rowtype: selectdisplay: Type
-
handle: test_groupfield:
type: groupdisplay: 'Test Group'if:
type: 'equals column'fields:
-
handle: columnsfield:
options:
1: '1'2: '2'type: selectdisplay: Columns
-
handle: rowsfield:
type: textdisplay: Rows
-
handle: test_textfield:
type: textdisplay: 'Test Text'if:
type: 'equals column'
Logs
No response
Environment
EnvironmentApplication Name: StatamicLaravel Version: 10.48.10PHP Version: 8.2.11Composer Version: 2.5.5Environment: localDebug Mode: ENABLEDMaintenance Mode: OFFCacheConfig: CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: statamicDatabase: mysqlLogs: stack / singleMail: smtpQueue: syncSession: fileLivewireLivewire: v3.4.12StatamicAddons: 3Sites: 2 (en, fr)Stache Watcher: EnabledStatic Caching: DisabledVersion: 5.1.0 PROStatamic Addonsjonassiewertsen/statamic-livewire: 3.3.1statamic-rad-pack/shopify: 3.3.0
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
When you create a group and give it a condition of show when, you can no longer access the data if a child precedes it.
Copy the data below and try re-ordering them inside your navigation to see what I mean.
How to reproduce
inside antlers:content/navigation/test.yamlcontent/trees/navigation/default/test.yamlresources/blueprints/navigation/test.yamlLogs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response