bug & tips

Last updated on
21 January 2024

​List of contents :



EntityStorageException: "'context' not found"

The module Media Contextual Crop API came with a patch on the module CROP (in order to add the "context" field to the entity). The patch are in the composer.json of media_contextual_crop module.

     "drupal/crop": {
                "provide_contextual_capability_to_crops": "https://www.drupal.org/files/issues/2023-11-06/%232617818-31-provide_contextual_capability_to_crops.patch"
            }

Please check the patch are correctly applied with an : composer reinstall drupal/crop

The response will be :

  - Installing drupal/crop (2.3.0): Extracting archive
  - Applying patches for drupal/crop
    https://www.drupal.org/files/issues/2023-11-06/%232617818-31-provide_contextual_capability_to_crops.patch (provide_contextual_capability_to_crops)

After,you may apply the update "crop_update_8006" function added by the patch.

After all, if the bug still here, please check if the 'context' field exist on crop_field_data table

## in bash
drush sql-cli # => will open DB CLI


## in mysql CLI
DESCRIBE crop_field_data;

Contextual Crop not "save" after closing modal 

When you save a overided crop, and the next time you open the modal crop area is back to full image.

It may be due the fact the patch on media_library_media_modify has not been applied.This patch is provided by the composer.json of Media Contextual Crop Reference

"drupal/media_library_media_modify": {
                "#3270150 Add alteration": "https://www.drupal.org/files/issues/2022-06-08/manage_crops_3270150-7.patch"
            },

Please check the patch are correctly applied with an : composer reinstall drupal/media_library_media_modify

The response will be :

  - Installing drupal/media_library_media_modify (1.0.0-beta15): Extracting archive
  - Applying patches for drupal/media_library_media_modify
    https://www.drupal.org/files/issues/2022-06-08/manage_crops_3270150-7.patch (#3270150 Add alteration)

After clear caches : drush cr

Tags

Help improve this page

Page status: No known problems

You can: