Open 4n70w4 opened 1 year ago
Also I get the same error if I try to upload file by edit form (but only in first time):
https://od.localhost/nova-vendor/dmitrybubyakin/nova-medialibrary-field/categories/undefined/media/avatar?fieldUuid=7c0fca01-3c64-4adb-9338-24b6ce79a1f0
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type smallint: \"undefined\"\nCONTEXT: unnamed portal parameter $1 = '...' (SQL: select * from \"categories\" where \"categories\".\"id\" = undefined limit 1)
File uploaded successfully, but display error.
No errors if I again try to upload file by edit form (without submit and without refresh page).
public function handle(Request $request, Closure $next) {
if ($request->route()->hasParameter('resourceId') && $request->resourceId === 'undefined') {
$request->route()->setParameter('resourceId', null);
}
return $next($request);
}
public function handle(Request $request, Closure $next) {
if ($request->route()->hasParameter('resourceId') && $request->resourceId === 'undefined') { $request->route()->setParameter('resourceId', null); } return $next($request); }
Add this middleware
Hi!
If I just open create form I get error:
If I try to upload file by created form I also get the same error.
Generated url's contain
undefined
asresourceId