Opened 6 weeks ago
Last modified 3 weeks ago
#52777 new defect (bug)
Editing an empty gallery results in a javascript error
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | needs-patch |
Focuses: | javascript | Cc: |
Description
How to reproduce?
- In the classic editor, create a post with a gallery with one image and save the post.
- Go to the media library and delete permanently this image.
- Go back editing the previous post. The gallery displays "No items found".
- Attempt to edit the gallery and check the browser console.
Here is the error displayed:
Uncaught TypeError: Cannot read property 'args' of undefined at n.<anonymous> (media-views.min.js?ver=5.8-alpha-50521:2) at f (underscore.min.js?ver=1.8.3:2)
and the trace:
(anonymous) @ media-views.min.js?ver=5.8-alpha-50521:2 f @ underscore.min.js?ver=1.8.3:2 setTimeout (async) (anonymous) @ underscore.min.js?ver=1.8.3:2 p @ backbone.min.js?ver=1.4.0:2 f @ backbone.min.js?ver=1.4.0:2 c @ backbone.min.js?ver=1.4.0:2 n.trigger @ backbone.min.js?ver=1.4.0:2 (anonymous) @ media-models.min.js?…r=5.8-alpha-50521:2 c @ load-scripts.php?c=0…r=5.8-alpha-50521:2 fireWith @ load-scripts.php?c=0…r=5.8-alpha-50521:2 (anonymous) @ wp-util.min.js?ver=5.8-alpha-50521:2 c @ load-scripts.php?c=0…r=5.8-alpha-50521:2 fireWith @ load-scripts.php?c=0…r=5.8-alpha-50521:2 l @ load-scripts.php?c=0…r=5.8-alpha-50521:2 (anonymous) @ load-scripts.php?c=0…r=5.8-alpha-50521:2 load (async) send @ load-scripts.php?c=0…r=5.8-alpha-50521:2 ajax @ load-scripts.php?c=0…r=5.8-alpha-50521:2 s.ajax.s.ajax @ load-scripts.php?c=0…r=5.8-alpha-50521:5 (anonymous) @ wp-util.min.js?ver=5.8-alpha-50521:2 s.Deferred.s.Deferred @ load-scripts.php?c=0…r=5.8-alpha-50521:5 send @ wp-util.min.js?ver=5.8-alpha-50521:2 sync @ media-models.min.js?…r=5.8-alpha-50521:2 fetch @ backbone.min.js?ver=1.4.0:2 more @ media-models.min.js?…r=5.8-alpha-50521:2 more @ media-models.min.js?…r=5.8-alpha-50521:2 edit @ media-editor.min.js?…r=5.8-alpha-50521:2 edit @ mce-view.min.js?ver=5.8-alpha-50521:2 edit @ mce-view.min.js?ver=5.8-alpha-50521:2 onclick @ plugin.min.js?wp-mce-49110-20201110:1 c.fire @ tinymce.min.js?ver=49110-20201110:2 fire @ theme.min.js?wp-mce-49110-20201110:1 o @ theme.min.js?wp-mce-49110-20201110:1 C @ tinymce.min.js?ver=49110-20201110:2 d @ tinymce.min.js?ver=49110-20201110:2
Change History (3)
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
6 weeks ago
Note: See
TracTickets for help on using
tickets.
Adding this to 5.8 so we can investigate further and work towards solving this. Thank you for your report!