-
-
Notifications
You must be signed in to change notification settings - Fork 608
Open
Description
Bug description
In a structured collection, if you were to create multiple entries, only the first one will have a URL.
This only occurs on the same request where you create them. Upon refreshing the page, they will all have URLs as expected.
How to reproduce
Have a structured collection, then create some entries.
$a = tap(Entry::make()->collection('pages')->etc())->save();
$b = tap(Entry::make()->collection('pages')->etc())->save();
$c = tap(Entry::make()->collection('pages')->etc())->save();
$a->url(); // outputs the url
$b->url(); // null
$c->url(); // nullLogs
No response
Versions
Statamic 3.2.30
Installation
Other (please explain)
Additional details
This is happening because we blink the tree contents here:
Lines 44 to 55 in 496e918
| public function tree($tree = null) | |
| { | |
| return $this->fluentlyGetOrSet('tree') | |
| ->getter(function ($tree) { | |
| $key = "structure-{$this->handle()}-{$this->locale()}-".md5(json_encode($tree)); | |
| return Blink::once($key, function () use ($tree) { | |
| return $this->structure()->validateTree($tree, $this->locale()); | |
| }); | |
| }) | |
| ->args(func_get_args()); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels