- last update
about 1 year ago 158 pass - 🇨🇦Canada robbdavis
I am seeing this behavior also. I am using media-library_media_modify so that I can alter the focal point only on this particular reference field.
When I go to configure the block where this image exists, then try to change the focal point, the change only applies if I view the preview first.
- 🇨🇦Canada robbdavis
Just did some more testing and the TLDR is that the only way the focal point change applies is if the preview image option is enabled AND the user actually previews the image.
If preview is not viewed, the changes do not apply.
This is on my local machine with caching off.
- 🇳🇱Netherlands Martijn de Wit 🇳🇱 The Netherlands
just a bold guess; could 🐛 hook_image_style_flush doesn't get the $path passed to Drupal\image\Entity\ImageStyle::flush() method Fixed be related to this?
- 🇺🇸United States jim.shreds
No cacheing enabled.
Previewing image after focal point change did nothing and flushing cache also does nothing. - 🇺🇸United States datawench
FWIW, this is happening for me, too, on both local (ddev) and remote (AWS environment). The specific context is media library. The focal point widget appears and is operable when adding an image in the media library modal, but the setting doesn't "take" unless you edit the image and reset it. I observe that when editing, I'm editing the media entity directly, rather than through the media library wrapper.
Drupal is at 10.1.1. The suggested patch doesn't appear to help, nor does flushing cache.
- 🇧🇪Belgium gwenweb
The patch didn't work for me either. I'm using Drupal 9.5.9 and attempting to enable the focal point feature by modifying the media after uploading it.
I also gave this a try: https://www.drupal.org/project/focal_point/issues/2906631#comment-15052967 🐛 After changing focal point, image doesn't change until you click preview Needs review but unfortunately, it doesn't appear to solve this issue either.
- last update
11 months ago Patch Failed to Apply - 🇧🇷Brazil brunomolica
I made some adjustments in the ".module" file and it worked as expected for me.
- 🇧🇪Belgium gwenweb
I've tested the focal_point_2906631.patch on Drupal 9.5.9, and it's working fine! I'm not marking it as "Reviewed & Tested by the community" because it would be great if someone could verify that the cache is flushed only for the updated image (not all images on the website).
- 🇫🇷France cedric_a France
Just a precision on @gwenweb comment (we discussed the patch together at DC Lille) she mean that we need someone to review the code to ensure that only image styles using the updated focal point are flushed.
@brunomolica your patch Failed to Apply. Can you fix it please? I will test this patch with D10 when it's done.
- last update
4 months ago 158 pass - 🇧🇪Belgium Den Tweed
Rerolled patch in #20 🐛 After changing focal point, image doesn't change until you click preview Needs review
Applies now but couldn't test due to unrelated error - Status changed to Needs work
4 months ago 4:45am 21 February 2024 - 🇳🇿New Zealand siramsay
I am getting the same as #18
Using with Media with the edit button. The Media edit button open the media/22/edit page in a modal.
Focal point does save, and the preview does work in the same manner as described in the original post.
You can visit the /media/22/edit from the /content/media page and the focal point is saved, and the preview is working as above.I need to flush the image style for the crop to take effect.
I am using it with in a Responsive image Style.
- 🇯🇴Jordan Ahmad Abbad Jordan
I'm facing the same issue that was mentioned in #25 🐛 After changing focal point, image doesn't change until you click preview Needs review but I'm using Drimage.
- last update
4 months ago Patch Failed to Apply - Status changed to Needs review
4 months ago 10:01pm 21 February 2024 - 🇳🇿New Zealand siramsay
Beautiful. I forgot to mention that I was using an optimization pipeline with WebP in my comment yesterday, and had thought this may have been the issue since.
This works on my site as described by the original poster @badrange
Now wondering if we should open a new issue or work on this one, as the workflow is strange is you want to use the preview button. I.e you need to click save on the modal which closes it and then re-open the edit to use the preview.
I have tried this patch: focal_point_2906631-24.patch and I use drupal 10.2.2. @Den Tweed . It work strangely. I change the focal point on my media type edition with one click on img but it doesn't change. BUT, if i double-click on my media-type to change focal point, a field appears and i save. I go on my content, img doesn't change but after i change my current breakpoint, img is update.
- 🇳🇱Netherlands Watergate
I stumbled upon the same problem and can confirm that the patch solved our problem.
- last update
3 months ago Patch Failed to Apply Drupal 10.2.2
Focal Point 2.0.3The patch #27 not working for me. After changing focal point, I need to make a clear cache to have the updated image in DOM and even then it's still the old image that's displayed. And if I refresh the page, the old image in displayed & is in DOM (the cropped image no longer appears anywhere).
- last update
about 1 month ago 159 pass - 🇮🇳India aman1248
"Hi @bleen, @Rajeshreeputra , I had replicated the aforementioned issue, implemented the necessary patches, and thoroughly tested Patch !24. It is now functioning properly, resolving the previously mentioned error. We can now move the ticket to RTBC. +1. Please review
- 🇬🇷Greece akz
This is my opinion/review on the available patches:
Patch #13 🐛 After changing focal point, image doesn't change until you click preview Needs review , also contains a code style enhancement (
[$x, $y] = explode(',', $focal_point);
) which a) is already implemented in module's latest version (2.1.0) and b) is not related to this issue. Patch should be ignored, as patches should only address one issue at a time.Patch #33 🐛 After changing focal point, image doesn't change until you click preview Needs review is the correct version of patch#13 (without the code enhancement), but it does not solve the problem (at least in my env: Focal point 2.1.0, Drupal 10.2.7).
Patch #20 🐛 After changing focal point, image doesn't change until you click preview Needs review solves the aforementioned problem. This is the one that should be accepted. @gwenweb I verify that only the updated image gets flushed/regenerated and not all images.
Patch #24 🐛 After changing focal point, image doesn't change until you click preview Needs review is practically the same code as in patch#20, only the paths to the module file are different. People complained that patch#20 could not be applied to their envs, hence the re-roll with different paths.
Patch #27 🐛 After changing focal point, image doesn't change until you click preview Needs review is the same code as in #20 and #24, plus it addresses the issue of updating webp generated images as well. Yes, it solves the problem with the webps, but it falsely assumes that there are webps to update. Image Optimize and ImageAPI Optimize WebP modules are not related to this module and they are definitely not prerequisites for it. So, any fix related to webps, should be addressed by those modules' end and not from this one. This patch should be ignored.
- 🇳🇱Netherlands Martijn de Wit 🇳🇱 The Netherlands
ok then let's set focus to #20.
Hide all other files...