10990 Posts in 2727 Topics by 1818 members
Page: 1 2
|Go to End||Next >|
27 June 2010 at 11:04pm
I have a problem.
I have Staff Page as described in SS first tutorials.
I have a number of images used.
They are stored by CMS in assets/Uploads/_resampled
THe problem is that when you resize image, delete image or upload a new one via SS control panel..
old resampled page are still there..
SO I need to force CMS to resample images..
According to the documentation
the way it used to be is to put images/flush to the end of URL (http://doc.silverstripe.org/urlvariabletools)
But this leads to "PAge not found" instead of resampling..
SO I suggested that in SS 2.4 there are some changes.. but I couldn't trace them in changes log..
I found a ticket at bug track system
So the method described in documentation is not working. I can't resample cashed images.
Moreover I cant access _resampled directory to manually delete files.. cause it is somehow protected...
What can I do?
28 June 2010 at 4:53am
28 June 2010 at 8:36am
flush=all doesnt resample images..
28 June 2010 at 8:52am
?flush=all should clear the _resampled directory and force the resampling when the image is next accessed. It will not resample them in itself.
If you are unable to manually delete the files in _resampled then it's possible it's a permission problem (try changing the permissions on the directory). the directory should be created (and therefore owned) by the web server user (on *nix systems at least). If you delete the entire directory then it will be re-created by the Image class when resampling the images (as they are accessed) so long as the web server has write privileges in /assets.
Another thing to consider (especially on a shared host) is the size of the source image, very large images can time out in the resize process if there's not enough memory available.
Thanks for pointing out that bug (and ticket), I wasn't aware of that and was considering some functionality based around it.
28 June 2010 at 9:32am
in my case ?flush=all doesn't delete _resampled directory.
And I can't do anything with _resampled..
I cant change permissions or delete the directory.. permission is denied for "admin"
It says that this directory and files are owned by "www-data"
I cant change ownership to "admin"..
I cant do anything with it..
28 June 2010 at 10:04am
?flush=all will not delete the _resampled directory, it should delete the contents (or at least the contents it knows about).
_resampled being owned by www-data sounds about right and you don't want to change that.
I'm guessing that you are using an FTP client to try these actions and if the user you are logging in to FTP with doesn't have write permissions on assets (or the parent of _resampled) then you won't get very far. How you rectify this depends on the level of access you have on the the server itself.
If you're using a shared host, do you have a management console that allows changing the ownership/permissions of folders in the web root? If it's your own server then get on there as a super user and get going with chmod/chown/chgrp.
Personally, I leave the ownership in tact and add my FTP user to the group and set the permissions against that. Don't worry about the permissions on _resampled right now, focus on the parent directory "assets" or "Uploads" so long as www-data and you (FTP account) have write access then you should be fine. Until you get the permissions sorted don't try using the CMS to manage this.
28 June 2010 at 10:27am
It's kind of shared host. My supervisor gave me his admin account.
I do have "write" permissions for /assets and for /assets/upload but I dont have write permission to /_resample dir
I am using FTP and SSH clients..
I'm not sure what kind of management console are you talking about.. Probably there is one.. My supervisor should know.. But I'm unable to talk with him. I'm supposed to have the account he himself is using.. so I should have all privileges..
Is there possible to take a few minutes of yours and talk via ICQ, skype, or other message system?
Thanks for help. I appreciate it!
28 July 2010 at 10:35pm Last edited: 28 July 2010 10:41pm
Today I've asked myself this same question... and I've found the solution:
just visit http://www.your-site.com/dev/tasks
there you'll find a list of tasks. Just click on "Flush Generated Images Task" and that's all
Page: 1 2
|Go to Top||Next >|