cms
cms copied to clipboard
PR 10226 introduced bug with nav tag when using select
Bug description
When using the select
param on the nav
tag in 5.19, it appears keys get cached internally across multiple calls especially when used within a loop.
How to reproduce
Reproducible with this repo: https://github.com/martyf/statamic-issue-bulk-augmentor
Within a nav
tag, the code is calling a Tag that returns the context's entry_id
.
On 5.19, you'll see the "Expected" results are not returned - the entry_id
is the same for every loop.
Change the composer.json statamic/cms
version to 5.18 and you'll see the entry_id
be correct for every loop.
On 5.19, if the changes to src/Data/BulkAugmentor.php
from #10226 are reverted, the issue disappears (however I'm not sure what impact that has on the PR's actually purpose)
This is only when the select
param is used - see resources/views/layout.antlers.html
. Remove the select
param on 5.19 and the Actual is correct.
Logs
No response
Environment
Application Name: Statamic
Laravel Version: 11.19.0
PHP Version: 8.3.9
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: bulk-augmentor.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.19.0 PRO
Installation
Fresh statamic/statamic site via CLI
Additional details
No response