Currently the library loads cropper.min.js and cropper.min.css directly from the root of the library folder. E.g: /libraries/cropper/cropper.min.js. Since Cropper itself has a different folder structure, we should load the files form a dist subfolder. E.g:/libraries/cropper/dist/cropper.min.js

Here is the Croppper repository: https://github.com/fengyuanchen/cropper

Comments

Lukas von Blarer created an issue. See original summary.

sasanikolic’s picture

Assigned: Unassigned » sasanikolic
sasanikolic’s picture

Status: Active » Needs review
StatusFileSize
new1.65 KB

Not sure if too much hardcoding?

luksak’s picture

Status: Needs review » Needs work

Well, /libraries/cropper/dist/ is too hardcoded. It could also be /sites/EXAMPLE/libraries/cropper/dist/, right?

sasanikolic’s picture

Right. Should we drop the hardcoded path from the error message and point the user to read the readme file (where we will explain how to properly set up the library)?

luksak’s picture

Yes, that would be better.

sasanikolic’s picture

Status: Needs work » Needs review
StatusFileSize
new1.61 KB
new939 bytes

Ok, so if the library module is enabled, we get the correct path (either in /libraries/cropper/dist or in /sites/default or XYZ or all/libraries/cropper/dist).

  • woprrr committed 92b3e45 on 8.x-1.x authored by sasanikolic
    Issue #2631676 by sasanikolic, Lukas von Blarer: Fix Cropper library...
woprrr’s picture

Version: » 8.x-1.x-dev
Status: Needs review » Fixed
Issue tags: +D8Media

Perfect :) Thanks for your jobs guys :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.