SpatieMediaLibraryImageEntry error Attempt to read property "media" on null on RepeaterEntry

$infolist
->schema([
SpatieMediaLibraryImageEntry::make('image'),
RepeatableEntry('productVariants')
->schema([
// This code error
SpatieMediaLibraryImageEntry::make('image')
->inlineLabel()
->square(),
]),
])
$infolist
->schema([
SpatieMediaLibraryImageEntry::make('image'),
RepeatableEntry('productVariants')
->schema([
// This code error
SpatieMediaLibraryImageEntry::make('image')
->inlineLabel()
->square(),
]),
])
4 Replies
Ilham Dimas Prayudha
Help?
Dennis Koch
Dennis Koch13mo ago
Please provide some information about your setup. The code above doesn’t even look syntactically correct 🤔
Ilham Dimas Prayudha
Sorry, i already edited it, so this code is on my ProductResource, when i want to make infolist like the code above, it give me error, another entry like TextEntry inside RepeatableEntry is working properly. The error message is "Attempt to read property "media" on null" When i use SpatieMediaLibraryImageEntry outside RepeatableEntry, it works properly. I got this error when use it inside RepeatableEntry.
Dennis Koch
Dennis Koch13mo ago
Sounds like it cannot the model to the file upload field.
Want results from more Discord servers?
Add your server