error when edit or create on some resources
Hi, I have this problem at edit and create works fine, after refresh this apears on create and edit works fine, after each refresh it changes. In console apears the error: XHR POST .... app.filament.resources.page-resource.pages.manage-pages [HTTP/2 500 Internal Server Error 702ms]. It's only on some resources, rest of them work fine. Could you help me, pls?
22 Replies
Not sure why you are shown a 503 when there is a 500 in the XHR. Can you check the DevTools network tab or Laravel log and see what’s the error is?
when create appears [HTTP/2 503 Service Unavailable 670ms], when edit is: [HTTP/2 500 Internal Server Error 616ms]
For 500: what’s the actual error?
It’s either returned with the XHR request or should be in the Laravel log
XHR POST ...app.filament.resources.page-resource.pages.manage-pages [HTTP/2 500 Internal Server Error 839ms]
Can you please show the result of the request in the network tab of DevTools? If any of this I unclear, please ask.
status 500, method POST, file app.filament.resources.page-resource.pages.manage-pages, initiator livewire.js:13(fetch), type: html. this?
in log is this error: local.ERROR: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2621440 bytes) {"userId":2,"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0):...
No. The result that’s coming back. The payload.
That sounds like a loop. Can you share the code if the resource?
just the form and the table
I guess it’s related to the 2 selects. Can you remove them and try again?
ok, now the create modal works but I still have 500 error on edit
Still the same error?
yes, and now changes: if I refresh the page the error in on create and edit works
So removed all Selects and still get "out of memory" errors?
yes
Anything special with the Model for that form?
Can you share the code?
yes, this function
maybe it's because of this
When is this executed? Try removing it. Can you load one or multiple instances of the model without Filament?
I removed the function, but I still have the error, without selects and without this function
in console is also a warning: Error while fetching an original source: can't assign to property "metadata" on "unsupported protocol for sourcemap request webpack://filament/%3Cno%20source%3E": not an object Source URL: <unknown>
That’s currently unrelated. Focus on the PHP error
If I remove RichEditor from PageResource , I don't have the error anymore. What my app don't like at RichEditor?
And in the other 2 resources I removed the Repeater and now no errors. And also no Repeater and no RichEditor, and I need them
I don’t think it’s an issue with the components. Maybe with the model and the loaded data.
It’s hard to debug a memory issue via Discord
I don't think so either. I know these components work well. I removed them just to see if the error goes away. I will check the data loaded in the components. Thank you for your help!