Fixed
- Deleting a media item no longer breaks every page that renders it.
<x-curator-glider>threwInvalid media item provided to Glider component.whenever an id no longer resolved and no fallback was set, so pages returned a 500. It now renders nothing and logs a warning naming the missing id. Misconfiguration still throws, now with a clearer message: a fallback name that was never registered reportsThe [name] glider fallback is not registered., and a fallback without a source still throws as before.- Note:
:media="null"without a fallback now renders nothing instead of throwing.
- Note:
- The glider's
widthandheightattributes now match the image Glide serves. Asking forwidth="960"on a 1600×900 image wroteheight="900"while Glide returned 960×540. That distorted the box and shifted the layout. The missing side is now derived from the aspect ratio, in either direction. Asrcseton a path or fallback with unknown dimensions no longer divides by zero. - Deleting media stored at the disk root can no longer delete the root itself. With a null directory (the default when
curator.default_directoryis null), the observer calleddeleteDirectory(null)once the disk held no files, which removed the disk root along with any empty folders. Renaming or replacing root-level media also stored paths with a leading slash (/renamed.jpg), which the Glide route then couldn't find. Both are fixed. - Glide now serves media from any disk. The default Glide server was hard-wired to
storage/app/public. Media on any other disk stored without error and then returned a 500. That included a fresh Laravel app'slocaldisk, whichdefault_diskfollows throughFILESYSTEM_DISK, as well as S3 and MinIO. Glide now reads each item from the disk it was stored on, so cloud disks no longer need a custom server config. A config passed toGlide::serverConfig()is still used exactly as given. - Pickers open in the configured default directory. Only uploads honoured
curator.default_directory. With it set, new files landed in that directory while the picker and rich editor panels opened at the disk root, so a file you had just uploaded wasn't listed. The picker, rich editor, media form, bulk upload andCuratorUtilsnow all fall back to it.
Fixed in #738, with regression tests for each fix.
Filament 4 users are covered: 5.x serves both majors.