diff --git a/changelog/unreleased/avatar-cropper-jcrop-path b/changelog/unreleased/avatar-cropper-jcrop-path new file mode 100644 index 000000000000..927a1b630cf7 --- /dev/null +++ b/changelog/unreleased/avatar-cropper-jcrop-path @@ -0,0 +1,14 @@ +Bugfix: Fix avatar cropper broken by Jcrop 2.0 file rename + +Uploading a non-square profile picture opened a cropper that immediately failed +with "$cropperImage.Jcrop is not a function". Bumping the Jcrop dependency from +0.9.12 to 2.0.4 renamed its distribution files from js/jquery.Jcrop.js and +css/jquery.Jcrop.css to js/Jcrop.js and css/Jcrop.css, but the personal profile +template still referenced the old paths. The script therefore failed to load, +the plugin never registered on jQuery, and the cropper could not be shown. The +template now loads the renamed Jcrop assets. + +Original Jcrop PR: https://github.com/owncloud/core/pull/38666 + +https://github.com/owncloud/core/issues/41723 +https://github.com/owncloud/core/pull/41724 diff --git a/settings/templates/panels/personal/profile.php b/settings/templates/panels/personal/profile.php index 52ae1761831e..713f791c2cd4 100644 --- a/settings/templates/panels/personal/profile.php +++ b/settings/templates/panels/personal/profile.php @@ -3,8 +3,8 @@ vendor_script('strengthify/jquery.strengthify'); vendor_style('strengthify/strengthify'); if ($_['enableAvatars']) { - vendor_script('jcrop/js/jquery.Jcrop'); - vendor_style('jcrop/css/jquery.Jcrop'); + vendor_script('jcrop/js/Jcrop'); + vendor_style('jcrop/css/Jcrop'); } ?>