I'm about lost with a weird error

Sorry if this was asked before, but after googling the error, reading through the docs, and trying out multiple things, I'm either an idiot or I can't find info on this error, and I've been trying for a while today. The error is No synthesizer found for key: "" and it happens when I'm using the FormUpload component. Now, the funny thing is that I use the same exact code, which is:
FileUpload::make('image')
->label('Image')
->directory('menu-items')
->image()
->nullable(),
FileUpload::make('image')
->label('Image')
->directory('menu-items')
->image()
->nullable(),
and it works perfectly in my resource. But, I've created a separate page for "Settings", and all the fields work perfectly except the file upload, which yields this error. The FileUpload code is identical sans the label. Any pointers as to where I shold look to debug this further is greatly appreciated, seeing as the stack error gives me about 0 info.
4 Replies
toeknee
toeknee3mo ago
try:
FileUpload::make('image')
->label('Image')
->directory('menu-items')
->image()
->default(null)
->nullable(),
FileUpload::make('image')
->label('Image')
->directory('menu-items')
->image()
->default(null)
->nullable(),
I suspect though, in your settings you need to set the image field to null.
Никола Стојков
Unfortunately already tried this variation, same error. That still wouldn't make sense why is it working in a resource.
awcodes
awcodes3mo ago
What is the code for your settings page?
toeknee
toeknee3mo ago
Yes it would, since in a resouce it's cast correctly and the settings pages if using spatie settings or similar will set default values. As awcodes stated, please provide your settings page class

Did you find this page helpful?