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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

[SOLVED] Uploadify refresh problem


Go to End


3 Posts   2584 Views

Avatar
JohnnyP

Community Member, 3 Posts

20 March 2011 at 5:29am

Edited: 20/03/2011 6:13am

Hey there!

Maybe someone can help me...
I've just started using MultiForm and added a simple Uploadify - ImageUploadField. Here's the code, actually quite simple:

<?php 

class CreateMultiFormStep_Images extends MultiFormStep {

	public static $next_steps = 'CreateMultiFormStep_Main';

	function getFields() {
	
		$fields = new FieldSet(new ImageUploadField('SourceImage', 'Upload source image'));
		return $fields;
	
	}

Now when I visit the page I am able to upload an image (the image is moved to the uploads folder) and there's a new file-entry in the database, but it seems like the upload's stuck on 100% - there's no thumbnail showing and the "Next"-button of the MultiFormStep is disabled!
Same problem occured using uploadify in a "normal" frontend form (no multiform-module). After uploading the file, the "submit"-button is disabled.

Uploadify is working perfectly fine in the backend.

I just can't figure out what's wrong, and it's driving me crazy, especially because I'm not getting any error messages at all.

Thanks for your help in advance,

Johnny

Avatar
JohnnyP

Community Member, 3 Posts

22 March 2011 at 12:32am

I checked the whole thing through with Charles and Firebug. The upload's completed, the server is responding with correct FileID and the JSON string containing the html for the image preview (path is also correct) and the success-message.

I checked uploadify_init.js and it seems like it's stuck in the success function, because "Working1" is logged, "Working2" is not:

success: function(data) {
console.log('Working1');
$preview.html(data.html);
 console.log('Working2');}

Still don't know what's wrong...

Avatar
JohnnyP

Community Member, 3 Posts

22 March 2011 at 12:59am

Edited: 22/03/2011 12:59am

Problem solved oO

I used the tutorial theme for my site. Changed it to blackcandy. Everything's working fine now.

Sometimes you can't see the wood for the trees...
Thanks anyway