Skip to content

Commit 018ca64

Browse files
authored
[5.x] Fix structure not being saved to collection (#13479)
1 parent dc55197 commit 018ca64

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/Entries/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ public function save()
482482
{
483483
$isNew = ! Facades\Collection::handleExists($this->handle);
484484

485+
Blink::forget("collection-{$this->id()}-structure");
486+
485487
$withEvents = $this->withEvents;
486488
$this->withEvents = true;
487489

tests/Data/Entries/CollectionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ public function it_saves_the_collection_through_the_api()
501501

502502
Facades\Collection::shouldReceive('save')->with($collection)->once();
503503
Facades\Collection::shouldReceive('handleExists')->with('test')->once();
504+
Facades\Blink::shouldReceive('forget')->with('collection-test-structure')->once();
504505
Facades\Blink::shouldReceive('forget')->with('collection-handles')->once();
505506
Facades\Blink::shouldReceive('forget')->with('mounted-collections')->once();
506507
Facades\Blink::shouldReceive('flushStartingWith')->with('collection-test')->once();

0 commit comments

Comments
 (0)