Opened 2 months ago
#62634 new defect (bug)
Bug Report: Error in mediaelement-and-player.js
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.1 |
Component: | Quick/Bulk Edit | Keywords: | changes-requested |
Focuses: | javascript, administration, coding-standards | Cc: |
Description
Summary
When using bulk select in the WordPress Media Library, selecting different types of media files (e.g., switching from a cloud-hosted video to an image) causes a console error:
Uncaught TypeError: Cannot read properties of null (reading 'length').
This issue is traced to the file mediaelement-and-player.js, line 4480.
Steps to Reproduce
- Navigate to the WordPress Media Library.
- Use the bulk select feature to select multiple media files.
- Select a video file hosted on the cloud (large file size).
- After selecting the video, quickly click to select an image file.
- Observe the console error in the browser's developer tools.
Observed Behavior
The console logs the error:
Uncaught TypeError: Cannot read properties of null (reading 'length')
at mediaelement-and-player.js:4480
Expected Behavior
- Switching between different types of media (cloud-hosted videos and images) should not trigger a JavaScript error.
- Bulk select functionality should work seamlessly without throwing errors.
Environment Details
- WordPress Version: 6.7.1
- Theme/Plugins: WP Offload Media Lite
- Browser: Edge
Media Files:
- Cloud Video: File size: > 50mb
- Image: File size: Any
Additional Notes
Issue is likely related to how mediaelement-and-player.js handles media metadata for files hosted on the cloud vs. locally.
Potential fix might involve adding a null check or handling edge cases for cloud-hosted media.
Would you like assistance debugging this further or crafting a patch for mediaelement-and-player.js?