Schema has no [record()] or [state()] set.

Trying to upgrade to v4, and i'm reciving this error when trying to access my PostCreate page Schema has no [record()] or [state()] set. in my resource i have something like:
public static function form(Schema $schema): Schema
{
return $schema
->components([])
}
public static function form(Schema $schema): Schema
{
return $schema
->components([])
}
Any idea?
2 Replies
frame
frame2mo ago
I get that error on a custom page if I forget to set state
public function infolist(Schema $schema): Schema
{
return $schema
->state($this->record)
public function infolist(Schema $schema): Schema
{
return $schema
->state($this->record)
though not sure if applicable here 🤔
jamesro
jamesroOP2mo ago
in my case was caused by presence of two hidden fields

Did you find this page helpful?