I believe the {{ collection:next }} and {{ collection:previous }} tags require the current ID to function. So if you open live preview without saving it first then it fails? because it has no ID field has been generated yet?
The prev/next methods attempt to fetch $this->currentEntry() however this returns null on live preview. If you die dump the value it just returns null.
public function next()
{
$this->params['from'] = $this->currentEntry()->collection()->handle();
return $this->output(
$this->entries()->next($this->currentEntry())
);
}
So the collection next or previous need a soft failure mode so you can live preview?
How to reproduce
Try live preview with {{ collection:next }} or {{ collection:previous }}.
Bug description
I believe the
{{ collection:next }}
and{{ collection:previous }}
tags require the current ID to function. So if you open live preview without saving it first then it fails? because it has no ID field has been generated yet?The prev/next methods attempt to fetch
$this->currentEntry()
however this returns null on live preview. If you die dump the value it just returns null.So the collection next or previous need a soft failure mode so you can live preview?
How to reproduce
Try live preview with
{{ collection:next }}
or{{ collection:previous }}
.Logs
No response
Versions
Statamic 3.2.16 Pro Laravel 8.64.0 PHP 8.0.6 elvenstar/statamic-meilisearch 0.1.3 statamic/ssg 0.9.0
Installation
Fresh statamic/statamic site via CLI
Additional details
No response