Image Crop Widget settings gives error when saving local path

Created on 16 January 2024, 5 months ago
Updated 8 May 2024, about 2 months ago

Hello and thanks for the module

Problem/Motivation

I am following your README.md
I want to have a local path for the libraries.
When I try to save the Cropper library settings I get the error message:

Error message
2 errors have been found:

    Custom Cropper libraryCustom Cropper CSS file

In the fields there is this message: The provided local file does not exist.
I have tried different paths but I was unable to find a way.

Steps to reproduce

  • Download the library and put the dist folder in /libraries/cropper/dist
  • Go to /admin/config/media/crop-widget
  • Write in the two fields
  • /libraries/cropper/dist/cropper.min.js
    /libraries/cropper/dist/cropper.min.css

  • Save
  • You get the error.

Proposed resolution

Make sure local files works on dev branch

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain candelas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @candelas
  • πŸ‡ΊπŸ‡¦Ukraine sickness29

    Hi @candelas @woprrr
    this issue is related to image_widget_crop module. crop module only provides api for image_widget_crop to use and README you have read was from image_widget_crop.

    However there's indeed issue with using library files and it comes from https://www.drupal.org/project/image_widget_crop/issues/3002576 β†’ .
    The description on textfields says "or leave empty to use the installed library (if present) or a CDN fallback" and the code added in related issue breaks that.
    When you save empty values the cdn placeholders values are saved and all checks in image_widget_crop_requirements or image_widget_crop_library_info_alter won't be looking for libraries anymore because there is saved values in config.

Production build 0.69.0 2024