Steps to reproduce the issue
This is NOT a duplicate ! This issue is about not being able to crop an image in a modal
Create a new article in Joomla 4 admin
on the "images and links" tab click select next to the intro image
Select an image, click the ... to get to the crop menu item - click it - draw new crop area and click select
Expected result
No JS error
Actual result
Loads of JS errors
core.min.js?714bd7c681dcb1da83e738c93edacebc:1 GET http://127.0.0.1/administrator/index.php?option=com_media&format=json&task=api.files&url=true&path=undefined&5478b23b8d5fa4aabc3c8007aa1f33e8=1&format=json 500 (Internal Server Error)
e.request @ core.min.js?714bd7c681dcb1da83e738c93edacebc:1
Promise @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
e.getImage @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
modalClose @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
querySelector.addEventListener.e @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
VM7440:27 Uncaught TypeError: Cannot read property 'message' of undefined
at <anonymous>:27:31
(anonymous) @ VM7440:27
joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1 Uncaught (in promise) undefined
onError @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
o.onreadystatechange @ core.min.js?714bd7c681dcb1da83e738c93edacebc:1
XMLHttpRequest.send (async)
e.request @ core.min.js?714bd7c681dcb1da83e738c93edacebc:1
Promise @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
e.getImage @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
modalClose @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
querySelector.addEventListener.e @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
core.min.js?714bd7c681dcb1da83e738c93edacebc:1 GET http://127.0.0.1/administrator/index.php?option=com_media&format=json&task=api.files&url=true&path=undefined&5478b23b8d5fa4aabc3c8007aa1f33e8=1&format=json 500 (Internal Server Error)
e.request @ core.min.js?714bd7c681dcb1da83e738c93edacebc:1
Promise @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
e.getImage @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
modalClose @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
querySelector.addEventListener.e @ joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1
VM7440:27 Uncaught TypeError: Cannot read property 'message' of undefined
at <anonymous>:27:31
(anonymous) @ VM7440:27
joomla-field-media.min.js?714bd7c681dcb1da83e738c93edacebc:1 Uncaught (in promise) undefined
System information (as much as possible)
Google chrome 70
Additional comments
Is there any PR ready for it?