From c01f73ba7b2abc3c1215349c65c17e5e6184527a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Fri, 24 Jul 2026 11:45:57 +0200 Subject: [PATCH 1/2] fix(settings): load renamed Jcrop 2.0 assets for avatar cropper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jcrop 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. The personal profile template still referenced the old paths, so the script 404ed, $.fn.Jcrop was never registered, and cropping a non-square avatar threw "$cropperImage.Jcrop is not a function". Point the template at the renamed assets. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- changelog/unreleased/avatar-cropper-jcrop-path | 11 +++++++++++ settings/templates/panels/personal/profile.php | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/avatar-cropper-jcrop-path diff --git a/changelog/unreleased/avatar-cropper-jcrop-path b/changelog/unreleased/avatar-cropper-jcrop-path new file mode 100644 index 000000000000..c7d3b2bc88e1 --- /dev/null +++ b/changelog/unreleased/avatar-cropper-jcrop-path @@ -0,0 +1,11 @@ +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. + +https://github.com/owncloud/core/pull/38666 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'); } ?> From afe1871afc2a3b4abe6a8ec0f9c38612e736fdc0 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Fri, 24 Jul 2026 22:20:11 +0930 Subject: [PATCH 2/2] chore: adjust changelog links for avatar cropper fix Signed-off-by: Phillip Davis --- changelog/unreleased/avatar-cropper-jcrop-path | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/avatar-cropper-jcrop-path b/changelog/unreleased/avatar-cropper-jcrop-path index c7d3b2bc88e1..927a1b630cf7 100644 --- a/changelog/unreleased/avatar-cropper-jcrop-path +++ b/changelog/unreleased/avatar-cropper-jcrop-path @@ -8,4 +8,7 @@ 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. -https://github.com/owncloud/core/pull/38666 +Original Jcrop PR: https://github.com/owncloud/core/pull/38666 + +https://github.com/owncloud/core/issues/41723 +https://github.com/owncloud/core/pull/41724