Skip to content

Image Editor Not Loading (possible Edge only bug) #18985

@rgbjay

Description

@rgbjay

What happened?

Description

When editing an image in the Image Editor, the image never fully loads. The preloader just spins infinitely.

Only spotted on Microsoft Edge - full stack and summary below (note that these errors appear as soon as the image editor loads not when trying to save - saving just throws an empty body error):

Image

JavaScript Error Log - Asset Image Editor

Error 1: Image Height Method Not Found

Type: TypeError
Message: e.image.getHeight is not a function
Location: AssetImageEditor.js:322:42
Stack Trace:

at AssetImageEditor.js:322:42
at app-vendor.js:2:250218
at HTMLImageElement.o (app-vendor.js:2:56273)

Error 2: Cannot Read 'removeAllListeners' Property

Type: TypeError
Message: Cannot read properties of undefined (reading 'removeAllListeners')
Location: AssetImageEditor.js:1946:31
Stack Trace:

at Object.hide (AssetImageEditor.js:1946:31)
at Object.e [as hide] (Base.js:76:36)
at Object.<anonymous> (Base.js:162:23)
at HTMLButtonElement.o (jquery.js?v=1779958211:2:86401)
at HTMLButtonElement.dispatch (jquery.js?v=1779958211:2:39853)
at Object.trigger (jquery.js?v=1779958211:2:69839)

Error 3: HTTP Request Failure

Type: HTTP Error
Status Code: 400 Bad Request
Endpoint: POST https://xxxxxxxx.com/admin/actions/assets/save-image
Method: saveImage() in AssetImageEditor.js:1775
Stack Trace:

xhr @ axios.js?v=1779958211:2
kt @ axios.js?v=1779958211:2
value @ axios.js?v=1779958211:2
sendActionRequest @ Craft.js:831
saveImage @ AssetImageEditor.js:1775

Error 4: Cannot Read 'width' Property

Type: TypeError
Message: Cannot read properties of null (reading 'width')
Location: AssetImageEditor.js:515:67
Triggered By: Window resize event → _repositionEditorElements()
Stack Trace:

at Object._repositionEditorElements (AssetImageEditor.js:515:67)
at Object.updateSizeAndPosition (AssetImageEditor.js:464:14)
at Object._handleWindowResize (Modal.js:371:14)
at Object.<anonymous> (Base.js:162:23)

Steps to reproduce

  1. Double click on an image
  2. Click Edit Image to open the image editor

Expected behavior

Image should load in the image editor

Actual behavior

Image partially loads with the preloader, but never fully finishes loading.

Craft CMS version

5.9.9

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

"born05/craft-sentry": "3.0.0",
"clubstudioltd/craft-asset-rev": "8.0.0",
"craftcms/aws-s3": "2.2.4",
"craftcms/ckeditor": "4.11.0",
"craftcms/cms": "5.9.9",
"craftcms/element-api": "4.2.0",
"craftcms/feed-me": "6.11.0",
"craftcms/mailgun": "3.1.0",
"craftcms/store-hours": "4.2.0",
"ether/simplemap": "5.0.4",
"jalendport/craft-preparse": "3.0.0-alpha.2",
"mailchimp/marketing": "^3.0",
"nystudio107/craft-cookies": "5.0.0",
"nystudio107/craft-minify": "5.0.0",
"nystudio107/craft-retour": "5.0.14",
"nystudio107/craft-seomatic": "5.1.20",
"putyourlightson/craft-sprig": "3.7.1",
"servd/craft-asset-storage": "4.2.3",
"solspace/craft-freeform": "5.14.14",
"spicyweb/craft-odds-and-ends": "5.1.0",
"studioespresso/craft-dumper": "5.0.1",
"studioespresso/craft-scout": "5.0.7",
"verbb/hyper": "2.3.1",
"verbb/navigation": "3.0.17",
"verbb/super-table": "4.0.5",

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions