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.

Content Editor Discussions /

Forum for content editors and CMS users.

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

server error in upload image field


Go to End


3 Posts   2664 Views

Avatar
KimK

Community Member, 7 Posts

8 November 2012 at 12:10am

Hello,

I have a strange error: It all works fine locally, but now on the webserver I get a server error message instead of the uploading field for the image. It only happens for the last image..

I have a couple of images:

static $has_one = array(
'Logo' => 'Image',
'QRCode_img' => 'Image',
'Image_1' => 'Image',
'Image_2' => 'Image',
'SponsoredBYImage' => 'Image',
'SponsorOfImage' => 'Image',
'fakeImage' => 'Image',
'Author' => 'Member'
);

function getCMSFields() {
$fields = new FieldSet(....

new ImageField('Logo'),
new ImageField('Image_1'),
new ImageField('Image_2'),
new ImageField('QRCode_img'),
new ImageField('SponsoredBYImage'),
new ImageField('SponsorOfImage'),
...);

as I mentioned I have no problems locally (wamp), but on the webserver where I really need it, I don't get the normal uploading field. Instead I have the server error message...

Has anybody an idea how that can be? Exactly the same code local and there...

Any help really appreciated!

Avatar
KimK

Community Member, 7 Posts

19 November 2012 at 1:19pm

Does nobody else have the problem?

Any hint why it works on my local server (wamp) and not on the webserver out there? Is there any configuration or version of anything I have to look for?

I still use SS2.4

Any help would be really appreciated.

Thanks

Avatar
martimiz

Forum Moderator, 1391 Posts

19 November 2012 at 10:42pm

Hi KimK,
The reason nobody replied to your question might be that this is the section devoted to the content editor = the TinyMCE editor used in the CMS...

No, I've not had this problem, but it might have something to do with the server settings - memory even. Did you get any other error or just the 500 server error. In that case setting your site to dev mode might help. In your _config.php:

Director::set_environment_type("dev");

Also the Firebug extension in FireFox might give you some clue...

You say the error only happens on the last image. Does it make any difference if you change the sequence of the ImageFields in your getCMSFields function?