-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
media library's one of the folders is not loading #5832
Comments
This error appears only when I am trying to open folder, which is not loading. No errors, when I am opening other folders. Full error Undefined array key "extension" {"userId":8,"exception":"[object] (ErrorException(code: 0): Undefined array key "extension" at vendor/tcg/voyager/src/Http/Controllers/VoyagerMediaController.php:89) |
While this is probably a bug. Empty nick probably wasn't expecting pathinfo() not to return keys on missing file extentions.
There needs to be a check for the existence of the extension key here before it's used. |
This was helpful. Indeed there was one file without any extention. I deleted it and it is opening in admin. Thank you for your helo. |
Laravel version
10.39
PHP version
8.2
Voyager version
1.7
Database
10.11.4 MariaDB
Description
Hi,
I upgraded both Laravel and Voyager. Laravel from 7 to 10 and Voyager from 1.5 to 1.7. The website is working, media library symlink in place.
When I open Media Libray in admin, it shows several folders. I can enter all folders, except one (which has folders and images), which I actively use and has almost 2.9 GB images. When I click on this folder, it is just shows loading animation. Before the update, the folder was opening without any problems.
The folder size could be problem, but is there any solution for this?
Steps to reproduce
Log shows this error
Undefined array key "extension" {"userId":8,"exception":"[object] (ErrorException(code: 0): Undefined array key "extension\ at vendor/tcg/voyager/src/Http/Controllers/VoyagerMediaController.php:89)
89 line is:
filename' => $item['filename'] ?? basename($item['path'], '.'.pathinfo($item['path'])['extension']),
Expected behavior
I expect folder to open and files are uploaded.
Screenshots
Additional context
no additional context
The text was updated successfully, but these errors were encountered: