tpr Posted December 8, 2016 Posted December 8, 2016 On 12/6/2016 at 4:00 PM, horst said: I have upgraded a site yesterday too. Here everything is working as expected. With both, existing and new created images. (PW 3.0.39 to 3.0.43) I have no time to investigate further but this fixes it (line 344) // if ($image->pagefiles === $pagefiles) { if ($image->pagefiles->page->id === $pagefiles->page->id) { Perhaps "===" is the culprit? PHP docs says Quote When using the identity operator (===), object variables are identical if and only if they refer to the same instance of the same class. 1
joey102030 Posted December 8, 2016 Posted December 8, 2016 7 hours ago, horst said: This is not intended, but its previous state is only saved for jpegs, not for png or gif formats. Thanks Horst Just tried it with a jpeg and it works a treat. Any plans to get this working for PNG / GIFs?
horst Posted December 8, 2016 Author Posted December 8, 2016 5 hours ago, joey102030 said: Thanks Horst Just tried it with a jpeg and it works a treat. Any plans to get this working for PNG / GIFs? Plans yes, - but currently no time. It will need a complete redesign of the storage. Currently it is stored with the original files in IPTC, and thats not supported by PNG and GIF. 1
horst Posted December 8, 2016 Author Posted December 8, 2016 13 hours ago, tpr said: I have no time to investigate further but this fixes it (line 344) // if ($image->pagefiles === $pagefiles) { if ($image->pagefiles->page->id === $pagefiles->page->id) { Perhaps "===" is the culprit? PHP docs says Have updated it now to version 0.9.17. There was another one pending with this part of the code. I thought I had already comitted it. Sorry! 2
Peter Knight Posted December 16, 2016 Posted December 16, 2016 Having an issue here too after upgrading from PW 3.X to PW 3.0.44 Firstly I was getting an error about the width of a crop so I replaced the entire site>modules>CroppableImage3 folder with the latest 0.9.17 Now I'm getting the following error Error: Uncaught Error: Call to a member function getCrop() on null in /var/www/vhosts/site.com/httpdocs/site/templates/blog-post.php:104 Stack trace: #0 /var/www/vhosts/site.com/httpdocs/wire/core/TemplateFile.php(268): require() #1 /var/www/vhosts/site.com/httpdocs/wire/core/Wire.php(374): ProcessWire\TemplateFile->___render() #2 /var/www/vhosts/site.com/httpdocs/wire/core/WireHooks.php(682): ProcessWire\Wire->_callMethod('___render', Array) #3 /var/www/vhosts/site.com/httpdocs/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #4 /var/www/vhosts/site.com/httpdocs/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array) #5 [internal function]: ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent)) #6 /var/www/vhosts/site.com/httpdocs/wire/core/Wire.php(376): call_user_func_array(Array, Array) #7 /var/www/vhosts/site.com/httpdocs/wire/core/WireHooks.php(682): ProcessWire\Wire->_callMethod('___ (line 104 of /var/www/vhosts/site.com/httpdocs/site/templates/blog-post.php) This error message was shown because: you are logged in as a Superuser. Error has been logged. Any suggestions on this one?
Peter Knight Posted January 19, 2017 Posted January 19, 2017 On 12/16/2016 at 10:30 AM, tpr said: Modules refresh? Yep - worked, thanks. It was more like 'Modules refresh' X 5 but I got there
jacmaes Posted January 30, 2017 Posted January 30, 2017 Anyone using this module with the latest dev (3.051)? After updating from the master branch (3.042 at the time of writing), it no longer points to the full URL of the crops, i.e. URL in Master: "/site/assets/files/9168/death-of-a-fisherman.675x0-landscape.jpg" Truncated URL in Dev: "/site/assets/files/9168/" A modules refresh hasn't fixed this issue.
horst Posted January 31, 2017 Author Posted January 31, 2017 On 30.1.2017 at 11:58 AM, jacmaes said: Anyone using this module with the latest dev (3.051)? After updating from the master branch (3.042 at the time of writing), it no longer points to the full URL of the crops, i.e. URL in Master: "/site/assets/files/9168/death-of-a-fisherman.675x0-landscape.jpg" Truncated URL in Dev: "/site/assets/files/9168/" A modules refresh hasn't fixed this issue. Can't reproduce that. All is working as expected with 3.0.52 (fresh install from scratch) How have you updated the version? Have you tried to clear / recreate other caches too? (Modules-Cache, FileCompilercache, etc.)
adrian Posted January 31, 2017 Posted January 31, 2017 That truncated URL suggests to me that you are calling an array of images rather than a single image. Is upgrading PW the only thing you did? 1
jacmaes Posted January 31, 2017 Posted January 31, 2017 @horst Yes, I've refreshed the modules a couple of times, and I've made sure to clear the cache (browser cache + "cache" folder in "assets"). I've tried on three different sites that are very similar, and same problem. @adrian Upgrading PW is indeed the only thing I did. Reverting back to the master branch fixes the issue immediately. My field setting is as such: And I'm calling the image this way: <img alt="<?= $page->title; ?>" src="<?= $page->image->first->getCrop('landscape')->url; ?>">
Peter Knight Posted January 31, 2017 Posted January 31, 2017 On 30/01/2017 at 10:58 AM, jacmaes said: Anyone using this module with the latest dev (3.051)? After updating from the master branch (3.042 at the time of writing), it no longer points to the full URL of the crops, i.e. URL in Master: "/site/assets/files/9168/death-of-a-fisherman.675x0-landscape.jpg" Truncated URL in Dev: "/site/assets/files/9168/" A modules refresh hasn't fixed this issue. I just had same issue after an upgrade to 3.0.51 and it couldn't be fixed by flushing the Modules.
tpr Posted February 7, 2017 Posted February 7, 2017 Is there a reason to have this console.log? https://github.com/horst-n/CroppableImage3/blob/a2d33c62f627b137306538ee1314d1d05526aa34/InputfieldCroppableImage3/InputfieldCroppableImage3.js#L19
PWaddict Posted February 10, 2017 Posted February 10, 2017 Has anyone managed to hide the Crop button? I tried with Admin Custom Files but with no success. EDIT: Ok I did it with Admin Custom Files.
PWaddict Posted February 13, 2017 Posted February 13, 2017 @horst Is it possible to force update the variations when the main crop has been edited without deleting the variations?
Macrura Posted February 14, 2017 Posted February 14, 2017 On 1/31/2017 at 0:35 PM, Peter Knight said: I just had same issue after an upgrade to 3.0.51 and it couldn't be fixed by flushing the Modules. I have the same issue. The module was working great on 3.0.33, then i upgraded to 3.0.52 and the frontend method of getting the crop no longer works; the images are there in the folders with the suffix, and the backend stuff all works; just can't get the crops to output on the front end for some reason; the method is just returning null; I have another site on a different server where this is running on 3.0.52 and does work...
jacmaes Posted February 14, 2017 Posted February 14, 2017 @Macrura @Peter Knight so we have a pattern. I'm not the only one experiencing this issue then.
horst Posted February 14, 2017 Author Posted February 14, 2017 15 hours ago, Macrura said: I have the same issue. The module was working great on 3.0.33, then i upgraded to 3.0.52 and the frontend method of getting the crop no longer works; the images are there in the folders with the suffix, and the backend stuff all works; just can't get the crops to output on the front end for some reason; the method is just returning null; I have another site on a different server where this is running on 3.0.52 and does work... On one server it is running after upgrading to 3.0.52, on another one not! This is not really a pattern, or is it one? @Macrura, can you give me access to that one where it is returning null? I use it on my installs and it works all as expected.
Macrura Posted February 14, 2017 Posted February 14, 2017 one of these was upgraded from the old cropping module to the new one, and one was started on 3x branch, and just added the cropping module; the module was probably installed after the upgrade to 3.0.52; not sure if any of those things make any difference; I can get you access to the admin and the FTP - i'm assuming you need both; will PM you in a bit. 1
Macrura Posted February 14, 2017 Posted February 14, 2017 in the meantime i can see from some quick testing that the getCrop method is getting stuck here: // return InputfieldCroppableImage3 or null if not found $inputFieldInstance = $this->_getInputFieldInstance($event); 1
adrian Posted February 14, 2017 Posted February 14, 2017 2 minutes ago, Macrura said: in the meantime i can see from some quick testing that the getCrop method is getting stuck here: // return InputfieldCroppableImage3 or null if not found $inputFieldInstance = $this->_getInputFieldInstance($event); Any chance you are running an old version of the module. That method is no longer used: https://github.com/horst-n/CroppableImage3/blob/e87b602cffbbdd648a48aa7a4975f927ff58f4d7/FieldtypeCroppableImage3/FieldtypeCroppableImage3.module#L80-L81 3
Macrura Posted February 14, 2017 Posted February 14, 2017 ok well yes, i was apparently running an older version (weird, just downloaded this from modules directory), but no idea how i had an out-of-date version, and the upgrades module shows nothing about this module... so this is fixed, by upgrading manually to the version on github 3
adrian Posted February 14, 2017 Posted February 14, 2017 2 minutes ago, Macrura said: the upgrades module shows nothing about this module I wonder if it has anything to do with using a string for the version number? I am switching my modules over to string version numbers as well, so would be good to know if that is the problem?
jacmaes Posted February 14, 2017 Posted February 14, 2017 @Macrura thanks, I can confirm that I no longer have the issue after downloading the module from Github manually. 2
Macrura Posted February 15, 2017 Posted February 15, 2017 I guess we need to do some testing, with regards to the version number issue? not sure how to conveniently test it though, but could have a look at the upgrades module and try and see why it doesn't even list the CroppableImage3 module... 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now