fix(settings): load renamed Jcrop 2.0 assets for avatar cropper#41724
Merged
Conversation
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 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
phil-davis
reviewed
Jul 24, 2026
phil-davis
reviewed
Jul 24, 2026
phil-davis
left a comment
Contributor
There was a problem hiding this comment.
Tested manually, profile pictures can be uploaded and/or use an existing file, and are processed correctly.
Contributor
|
Fixes #41723 |
Signed-off-by: Phillip Davis <phil@jankaritech.com>
phil-davis
approved these changes
Jul 24, 2026
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the avatar cropper, which broke with
$cropperImage.Jcrop is not a functionwhen uploading a non-square profile picture.Root cause
PR #38666 bumped
@bower_components/jcropfrom 0.9.12 → 2.0.4. Jcrop 2.0 renamed its distribution files:js/jquery.Jcrop.js→js/Jcrop.jscss/jquery.Jcrop.css→css/Jcrop.cssBut
settings/templates/panels/personal/profile.phpstill referenced the old paths viavendor_script/vendor_style. The script 404'd,$.fn.Jcropwas never registered on jQuery, and cropping threw$cropperImage.Jcrop is not a function(profile.js:93).Fix
Point the template at the renamed Jcrop assets.
Compatibility
The Jcrop 2.0.4 JS API is backward-compatible with
profile.js's usage —onChange,onSelect,setSelect,aspectRatio,boxWidth,boxHeightare all still supported through 2.0.4'slegacyHandlersshim, which invokes the callback with the unscaled{x, y, w, h}coords thatsaveCoords/sendCropDataexpect.Jcrop.gifis referenced relative to the CSS and ships in the 2.0.4 package. So this is purely a filename-path break, not an API break.🤖 Generated with Claude Code