Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Noob Problem adding Images (linux) [solved]


Go to End


2 Posts   1106 Views

Avatar
Billsutils

Community Member, 2 Posts

8 November 2010 at 3:18am

Edited: 08/11/2010 3:24am

Hi, I've only just started poking silverstripe about so this probably just a grotesque Noob problem.

First off: I'm running Ubuntu 10.4 with xampp (known as lampp in linux) and I have the silverstripe stuff under htdocs/silverstripe.

I can see the site and have changed the theme OK (currently set to fancypants). Site is visible via http://localhost/silverstripe/
Adding & deleting text, saving/publishing site etc is no problem.

But I cannot seamlessly add an image to the site.

Here is what I do:
I have manually added a jpg (armouredspit.jpg) to directory assets/Uploads. Ready to add to the site.

I have changed all permissions on everything to rw or rwx as appropriate

When I add the image to the editor it gets grabbed and successfully displayed until I hit the save button. When I save the draft the image dissapears. The editor just displays an empty box.

In the editor, I then right click on the empty image box and select "insert/edit image" it displays the path to the missing image as:
"assets/Uploads/_resampled/resizedimage600402-armouredspit.jpg".

Neither that directory or file exist. And I have not intentionally resized the jpg.

I have tried manually creating the _resampled directory but nothing gets written into it.

If I change to path via right click "insert/edit image" to match the actual image location (assets/Uploads/armouredspit.jpg) the image is displayed and saves sucessfully.

This pathing problem also re-occurs if, after fixing the path I then resize the image. The path gets modified to the _resampled path ( I suppose as expected).

I am somewhat stumped by this. Any thoughts/suggestions gratefully received.

p.s. I'm running silverstripe 2.4.2

thanks
Bill

Avatar
Billsutils

Community Member, 2 Posts

8 November 2010 at 4:19am

Idiot of the week award for me.

No. I had not changed all the permissions (it <b>had</b> to be a permissions problem).

just in case anyone else does the same thing...
I had downloaded silverstripe to my home directory and softinked to it from htdocs. But (of course) when you are running silverstripe it is in a webbrowser and NOT as the the owner. While I had changed permission at the lower levels I had not changed the overall permission on silverstripe so the directory was blocking the file from being written.

Now it works as expected.

regards
Bill