- Issue created by @bhogue
- 🇬🇧United Kingdom xax London, UK
I have exactly the same problem and identical error messages on D10.2.7
- Assigned to ananya.k
- 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
Prem Suthar → made their first commit to this issue’s fork.
- Issue was unassigned.
- Status changed to Needs review
5 months ago 11:30am 18 July 2024 Hi @bhogue,
Successfully resolved the issue. Please refer to the attached patch .
Thank you!
Thanks!
- Assigned to dev2.addweb
- 🇬🇧United Kingdom xax London, UK
#5 patch works fine on D10.2.7, php 8.1, thanks!
- Issue was unassigned.
- Status changed to RTBC
5 months ago 1:29pm 18 July 2024 - 🇮🇳India dev2.addweb
Thanks @ananyak,
I have tested patch and created MR . Working as expected and preview result is now fine. Moving to RTBC. - 🇩🇪Germany sunlix Wesel
Can confirm that the change works.
It's just the missing member variable for the dependency injection introduced in 📌 Preview all image styles based on FocalPointEffectBase Fixed :-) - 🇨🇴Colombia carma03
Confirming patch #5 🐛 Preview results in Error: Call to a member function getDefinitions() on null Active works for me too on D10.2.7 and PHP 8.2.18.
Thanks ananyak → - 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
baluertl → made their first commit to this issue’s fork.
- 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
@ananya.k → thanks for providing a working solution.
@nilesh.addweb → your initial commit e9803fdb on the MR changed only 1 line of code, but the patch from comment #5 is about several lines to change. As I assumed this was by mistake, I supplied the missing modifications.
- 🇨🇦Canada Ron Collins
I'm still having the same issue after applying this patch. I'm finding it strange that there are several people claiming this works.
Drupal 10.3.5
PHP 8.1.27
DDEV
Focal Point 2.1.1Is there something more to do than apply the patch and
drush cr
?A clean install of FP 2.1.0 also doesn't work as indicated in the description of the ticket.
- 🇸🇪Sweden kristofferwiklund
For me applying the patch fixes the preview problem.
@ron-collins can you verify on disk that the files has been changed? For example in src/Controller/FocalPointPreviewController.php on row 83 you should have: EntityStorageInterface $fileStorage
- 🇨🇦Canada Ron Collins
@kristofferwiklund yes, I see that code. I am seeing some Ajax errors in the console when I click preview link. The error is really long, mostly SVG. Not sure it's worth posting.
- 🇨🇦Canada Ron Collins
I did notice a configuration problem I had. It worked better after fixing that but got the "something went wrong" message after previewing and then moving the focal point and trying to preview again. Ajax errors too.
- 🇺🇸United States adamzimmermann
This seems to duplicate the work in 🐛 imageEffectManage not assigned RTBC . This MR includes some additional refactoring though.
- 🇺🇸United States seoulpanda20
This is a critical issue for me.
The patch from #5 only half-works for me. I can preview until I change the focal point, and then future previews stop working and Ajax errors are thrown in console.
- DDEV
- Drupal 10.3.6
- PHP 8.3
- Focal Point 2.1.0 and 2.1.1I tried with PHP 8.1 as well. Still erroring out.
- 🇺🇸United States dave reid Nebraska USA
I would agree this is at least major since the module isn't functional without this fix. I have tested the fix using the MR changes and agree this is ready for merging and releasing.
- 🇫🇮Finland Alexander Tallqvist
MR 36 seems to fix the issue for us. Running 2.1.1 w/Drupal 10.3.6.
- 🇨🇦Canada Ron Collins
#21 and #25 seem to be the same issue. Has anyone else tested that scenario?
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Also encountered this on a project of us today. I could not find a configuration issue, the patch resolved the issue.
- 🇺🇸United States RichardDavies Portland, Oregon
I have the same issue as #21 and #25. I tried both the patch in #5 and MR 36. Both fixed the Preview button so that it works again, but only when initially clicked. After I close the preview window the Preview button doesn't work anymore. I have to refresh the edit media page before I can use the Preview link again. This makes it very challenging to preview multiple focal points.
Here are the console logs from my browser showing the initial request from the preview link that worked, followed by the request from the second preview link click which doesn't work due to a JavaScript error:
- 🇩🇪Germany rkoller Nürnberg, Germany
@richarddavies on which version of drupal have you tested? because on my 11.x test instance i am able to open the images preview dialog modal and close several times in a row with MR36 checked out.
- 🇺🇸United States RichardDavies Portland, Oregon
My testing was on Drupal 10.3.5.
- 🇩🇪Germany rkoller Nürnberg, Germany
ah yep can confirm that, just spun up an instance of drupal 10.3.8 and the preview button works as expected there as well. should the issue set back to RTBC?
- First commit to issue fork.
- 🇮🇳India rajeshreeputra Pune
Yes, we missed an assignment
$this->imageEffectManager = $imageEffectManager;
, merging this for now and will release 2.1.2 → tag -
rajeshreeputra →
committed f57babae on 2.x authored by
nilesh.addweb →
Issue #3462165: Preview results in Error: Call to a member function...
-
rajeshreeputra →
committed f57babae on 2.x authored by
nilesh.addweb →
Automatically closed - issue fixed for 2 weeks with no activity.