[wp-trac] [WordPress Trac] #62634: Bug Report: Error in mediaelement-and-player.js
WordPress Trac
noreply at wordpress.org
Tue Dec 3 04:30:12 UTC 2024
#62634: Bug Report: Error in mediaelement-and-player.js
-------------------------------------------------+-------------------------
Reporter: salmanulharischolakkal | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Quick/Bulk Edit | Version: 6.7.1
Severity: normal | Keywords: changes-
Focuses: javascript, administration, coding- | requested
standards |
-------------------------------------------------+-------------------------
**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**
1. Navigate to the WordPress Media Library.
2. Use the bulk select feature to select multiple media files.
3. Select a video file hosted on the cloud (large file size).
4. After selecting the video, quickly click to select an image file.
5. 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?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62634>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list