Ensure result of Data hydration is handleable by the Cascade#27
Ensure result of Data hydration is handleable by the Cascade#27marcorieser merged 1 commit intomainfrom
Conversation
|
@marcorieser The A more consistent fix would be to resolve the content eagerly and skip protected function hydrateContent(): void
{
$content = Data::findByRequestUrl(Livewire::originalUrl());
if ($content) {
Cascade::withContent($content);
}
}This matches exactly what happens on the initial page load - when there's no content entry for the URL, the Cascade just doesn't get content set at all. |
|
@jonathan-bird Yeah, I see that, but I don't want to hydrate the content if the Cascade is not used in the request. Need to think about it for a bit. Once Jason merged this PR (statamic/cms#14502), I can remove |
|
@marcorieser Yeah I believe so, solves it further up the chain which is even better. |
Fixes: #26