-
-
Notifications
You must be signed in to change notification settings - Fork 597
Open
Labels
Description
Bug description
We have a custom addon that adds additional fields to the blueprint via $blueprint->setContents(...).
In Statamic 5 when the setContents is called the cache is not being reset after updating the content when called on existing blueprint that is attached to an entry (e.g. has a parent).
The cache only gets cleared when the blueprint changes from lastBlueprintHandle but in an existing blueprint its the same and the cache is not getting cleared. It was working properly in Statamic 4.
Because of that the added fields are always empty when editing an entry.
How to reproduce
- Subscribe to
EntryBlueprintFound::classevent and add a new tab to the Blueprint. - Call
$blueprint->setContents($newContents) - The fields will appear on the frontend but when trying to save they will always be empty.
Logs
No response
Environment
Environment
Application Name: Abnormal
Laravel Version: 10.48.10
PHP Version: 8.1.28
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: abnormal.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: ses
Queue: sync
Session: file
Statamic
Addons: 5
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.3.0 PRO
Statamic Addons
jacksleight/statamic-bard-mutator: 2.3.1
jacksleight/statamic-bard-texstyle: 3.2.2
pecotamic/sitemap: 1.4.7Installation
Fresh statamic/statamic site via CLI
Additional details
No response
