Problem/Motivation
Content-specific crops not getting saved.
When the media image is edited from within the context of a node ('Override media item in context of Action "Example") the crops are available, but they do not apply when viewed— indeed, they are apparently not saved, because when edited again it starts with the crop from the media itself not the override. Other overridable elements, such as ALT text, are working as expected.
Steps to reproduce
Version: 1.1.1
Two crop types configured (manual crop with automated crop fallback).
Used in two image styles.
Which are used by two responsive image styles.
For the full setup:
composer create-project drutopia/drutopia_dev_template:dev-main --keep-vcs --no-interaction drutopia-dev-site
And install Drutopia Drupal through the UI (not Drush, sorry).
Comments
Comment #2
mlncn commentedthis is the case whether or not using the patch specified here https://www.drupal.org/project/media_library_media_modify/issues/3270150...
Comment #3
drdam commentedHave you activate Media Contextual Crop Reference module ?
This mode are mandatory to use "media with context" fields, and it was this module which get the patch
Comment #4
drdam commentedComment #5
mlncn commentedOne more note, "media_responsive_thumbnail" is used but again i don't think it's on display but 'save' that the problem is.
Comment #6
mlncn commentedOh! We were not using https://www.drupal.org/project/media_contextual_crop_field_formatter
I think i thought that it was required and would already be there!
Comment #7
mlncn commentedOK we seem much closer— a fatal error! Are we missing some configuration still? The 1.1 branch says it can use image formatter?
Full stack trace:
And you've been very helpful, do you have an open collective or Kofi or similar to throw in some token of appreciation?
Comment #8
drdam commentedI think, i have find, your responsive_image configuration have only one image..
I have push a fix on 1.2.x-dev of media_contextual_crop main module
Comment #9
drdam commentedComment #10
mlncn commentedYes! We will of course be filling out more image styles per responsive image style, but in our initial we had only one.
Comment #11
mlncn commentedAll right! The crops are being saved, and no fatal error!
Still not seeing the crops— missing somewhere to configure that?
And/or also getting this:
Full stack trace of the warning:
Comment #12
drdam commentedStack traces are from twig, so it doesn't be usefull ...
I push new commit in 1.2.x-dev, with "better understanding" of responsive images...
can you test ?
Comment #13
drdam commentedEdit : I edit title to point to the right bug
Comment #15
drdam commentedComment #16
mlncn commentedThat works!!
Comment #17
drdam commentedreleased in 1.2.1