Skip to content

Can't reference augmented fields in a computed value #11853

Description

@edalzell

Bug description

If you create a computed field but reference an augmented value, you get recursion/timeouts when you try to retrieve the entry in tinker (and elsewhere you get nginx 503, seg faults)

How to reproduce

On a brand new site, put the following in the AppServiceProvider:

 Collection::computed(
'pages',
'custom',
fn (Entry$entry) => $entry->permalink
);

Then open tinker and try \Statamic\Facades\Entry::find("home"). You'll see tinker immediately quit. If you remove the call to ->permalink and return a string instead, everything is fine

Logs

Environment

EnvironmentApplication Name: StatamicLaravel Version: 12.17.0PHP Version: 8.3.22Composer Version: 2.8.9Environment: localDebug Mode: ENABLEDURL: computed.testMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: NOT CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStoragepublic/storage: NOT LINKEDStatamicAddons: 0Sites: 1Stache Watcher: Enabled (auto)Static Caching: DisabledVersion: 5.57.0 Solo

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions