Internal server error in asset-admin if file is missing
Closed this issue · 3 comments
kinglozzer commented
If the underlying file for an image is missing, clicking the file in the assets admin section results in an internal server error:
Call to a member function getWidth() on null
Which comes from here:
silverstripe-focuspoint/src/Forms/FocusPointField.php
Lines 86 to 90 in 16dedb9
I think we just need an if ($previewImage)
check in there somewhere, I’m not sure what happens if you omit the previewUrl
/previewWidth/
previewHeight` schema items 😅
kinglozzer commented
Yeah I am on 3.1.1, #59 sounds similar but I think it’s a different cause
jonom commented
Fixed by #74 thanks @kinglozzer and @ohararyan!