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

Upload image stuck in "Processing"


Go to End


31 Posts   11695 Views

Avatar
Ryan M.

Community Member, 309 Posts

31 July 2010 at 10:59am

I'm having this same problem, except I'm using the latest versions of the platform & the module and session.use_only_cookies is off, and I'm uploading movie files instead of image files.

PS I am not processing the videos thru the FLV function in DataObjectManager. I'm just uploading mov and mp4 files directly to pull into a video player.

Any pointers? I didn't find anything unusual in my SWFUpload debug output, but here it is anyway for reference:

---SWFUpload Instance Info---
Version: 2.2.0 Alpha
Movie Name: SWFUpload_0
Settings:
	upload_url:               http://dev.domain.com/FileDataObjectManager_Controller/handleswfupload
	flash_url:                http://dev.domain.com/swfupload/javascript/swfupload.swf?swfuploadrnd=681997214
	use_query_string:         false
	file_post_name:           swfupload_file
	post_params:              [object Object]
	file_types:               
	file_types_description:   
	file_size_limit:          100MB
	file_upload_limit:        20
	file_queue_limit:         20
	debug:                    true
	prevent_swf_caching:      true
	button_placeholder_id:    spanButtonPlaceholder
	button_image_url:         http://dev.domain.com/swfupload/images/upload_button.png
	button_width:             180
	button_height:            24
	button_text:              <span class='button'>Upload files</span>
	button_text_style:        .button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; }
	button_text_top_padding:  6
	button_text_left_padding: 6
	button_action:            -110
	button_disabled:          false
	custom_settings:          [object Object]
Event Handlers:
	swfupload_loaded_handler assigned:  true
	file_dialog_start_handler assigned: true
	file_queued_handler assigned:       true
	file_queue_error_handler assigned:  true
	upload_start_handler assigned:      true
	upload_progress_handler assigned:   true
	upload_error_handler assigned:      true
	upload_success_handler assigned:    true
	upload_complete_handler assigned:   true
	debug_handler assigned:             true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG: 
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0 Alpha 2008-10-17
SWF DEBUG: movieName:              SWFUpload_0
SWF DEBUG: Upload URL:             http://dev.domain.com/FileDataObjectManager_Controller/handleswfupload
SWF DEBUG: File Types String:      *.*
SWF DEBUG: Parsed File Types:      
SWF DEBUG: File Types Description:  ()
SWF DEBUG: File Size Limit:        104857600 bytes
SWF DEBUG: File Upload Limit:      20
SWF DEBUG: File Queue Limit:       20
SWF DEBUG: Post Params:
SWF DEBUG:                         fileFieldName=Attachment
SWF DEBUG:                         OverrideUploadFolder=Uploads
SWF DEBUG:                         fileClassName=File
SWF DEBUG:                         PHPSESSID=sn8g6u602rbdgrpf6u8g400ih6
SWF DEBUG:                         dataObjectFieldName=Videos
SWF DEBUG:                         dataObjectClassName=Video
SWF DEBUG:                         controllerID=175
SWF DEBUG:                         hasDataObject=1
SWF DEBUG:                         parentIDName=ProfileID
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: fileFieldName=Attachment
SWF DEBUG: Global Post Item: OverrideUploadFolder=Uploads
SWF DEBUG: Global Post Item: fileClassName=File
SWF DEBUG: Global Post Item: PHPSESSID=sn8g6u602rbdgrpf6u8g400ih6
SWF DEBUG: Global Post Item: dataObjectFieldName=Videos
SWF DEBUG: Global Post Item: dataObjectClassName=Video
SWF DEBUG: Global Post Item: controllerID=175
SWF DEBUG: Global Post Item: hasDataObject=1
SWF DEBUG: Global Post Item: parentIDName=ProfileID
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to http://dev.domain.com/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0

Nothing at the end of the upload, just the last line of uploading and nothing else:

SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 41866228. Total: 41866228 [here it finishes the upload and all activity stops here, and the field hangs on processing]

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 August 2010 at 2:29am

When was the last time you updated the code? There was just a patch that went in a few days ago.

Avatar
Ryan M.

Community Member, 309 Posts

1 August 2010 at 6:58am

Really? I'll go grab that then. Code's older than that.

Avatar
Ryan M.

Community Member, 309 Posts

1 August 2010 at 11:48am

Wait, do you mean SS or the SWFUpload module?

Avatar
Ryan M.

Community Member, 309 Posts

1 August 2010 at 5:11pm

Edited: 01/08/2010 5:25pm

Updated SS 2.4.1 and got it to complete the upload. However after going to the next form, it shows this:

[Notice] Undefined index: uploaded_files
GET /admin/EditForm/field/Videos/EditUploadedForm/field/VideoThumb/iframe?ctf[Videos][start]=0&ctf[Videos][per_page]=10&ctf[Videos][showall]=0&ctf[Videos][sort]=Created&ctf[Videos][sort_dir]=DESC&ctf[Videos][search]=&ctf[Videos][filter]=&ctf[Videos][view]=

Line 393 in /var/www/vhosts/dev.domain.com/httpdocs/dataobject_manager/code/FileDataObjectManager.php

Source

384 	public function EditUploadedForm()
385 	{
386 		if(!$this->hasDataObject)
387 			return $this->closePopup();
388 
389 		$childData = $this->getChildDataObj();
390 		$validator = $this->getValidatorFor($childData);
391 		$fields = $this->getFieldsFor($childData);
392 		$fields->removeByName($this->fileFieldName);
393 		$total = isset($_POST['totalsize']) ? $_POST['totalsize'] : sizeof($_POST['uploaded_files']);
394 		$index = isset($_POST['index']) ? $_POST['index'] + 1 : 1;
395 		$fields->push(new HiddenField('totalsize','',$total));
396 		$fields->push(new HiddenField('index','',$index));
397 		if(isset($_POST['uploaded_files']) && is_array($_POST['uploaded_files'])) {
398 			$remaining_files = $_POST['uploaded_files'];
399 			$current = $remaining_files[0];
Trace

FileDataObjectManager->EditUploadedForm(SS_HTTPRequest) 
Line 137 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest) 
Line 155 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest) 
Line 155 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest) 
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest) 
Line 281 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
Director::direct(/admin/EditForm/field/Videos/EditUploadedForm/field/VideoThumb/iframe)
Line 127 of main.php

DId you update the DataObjectManager recently as well?

Avatar
elsbth

Community Member, 8 Posts

5 August 2010 at 8:24pm

I use ImageDataObjectManager and SWFUpload to upload images to a slideshow om my site. Yesterday I upgraded Silverstripe from 2.3.4 to 2.4. I also got the newest versions of DataObjectManager and SWFUpload. I'm working in Windows 7 on WAMP.

My problem is as described in the first post: when I try to upload an image the process bar gets stuck on "Processing". This happens in Firefox 3.6.8 and in Chrome 5.0. In Internet Explorer 8 it works like it should.

I've tried this: http://open.silverstripe.org/attachment/ticket/5547/2.4.0-FileUpload.diff but it was still the same.

I've tried this: "And make sure that the PHP setting "session.use_only_cookies" is set to off" and it worked, but I'm not sure I can change the php.ini for the live site. And since it's working in IE8, maybe that's not the problem?

SWFUploadConfig::debug(); gives:

---SWFUpload Instance Info---
Version: 2.2.0 Alpha
Movie Name: SWFUpload_0
Settings:
upload_url: http://localhost/mysite/FileDataObjectManager_Controller/handleswfupload
flash_url: http://localhost/mysite/swfupload/javascript/swfupload.swf?swfuploadrnd=839376671
use_query_string: false
file_post_name: swfupload_file
post_params: [object Object]
file_types: *.jpg;*.JPG;*.jpeg;*.JPEG;*.gif;*.GIF;*.png;*.PNG;
file_types_description:
file_size_limit: 20MB
file_upload_limit: 20
file_queue_limit: 20
debug: true
prevent_swf_caching: true
button_placeholder_id: spanButtonPlaceholder
button_image_url: http://localhost/mysite/swfupload/images/upload_button.png
button_width: 180
button_height: 24
button_text: <span class='button'>Upload files</span>
button_text_style: .button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; }
button_text_top_padding: 6
button_text_left_padding: 6
button_action: -110
button_disabled: false
custom_settings: [object Object]
Event Handlers:
swfupload_loaded_handler assigned: true
file_dialog_start_handler assigned: true
file_queued_handler assigned: true
file_queue_error_handler assigned: true
upload_start_handler assigned: true
upload_progress_handler assigned: true
upload_error_handler assigned: true
upload_success_handler assigned: true
upload_complete_handler assigned: true
debug_handler assigned: true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG:
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number: SWFUPLOAD 2.2.0 Alpha 2008-10-17
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: Upload URL: http://localhost/mysite/FileDataObjectManager_Controller/handleswfupload
SWF DEBUG: File Types String: *.jpg;*.JPG;*.jpeg;*.JPEG;*.gif;*.GIF;*.png;*.PNG;
SWF DEBUG: Parsed File Types: jpg,jpg,jpeg,jpeg,gif,gif,png,png,
SWF DEBUG: File Types Description: (*.jpg;*.JPG;*.jpeg;*.JPEG;*.gif;*.GIF;*.png;*.PNG;)
SWF DEBUG: File Size Limit: 20971520 bytes
SWF DEBUG: File Upload Limit: 20
SWF DEBUG: File Queue Limit: 20
SWF DEBUG: Post Params:
SWF DEBUG: PHPSESSID=8rsvhk49tpd0e4t4j6qpi1ers4
SWF DEBUG: hasDataObject=1
SWF DEBUG: parentIDName=CarPageID
SWF DEBUG: OverrideUploadFolder=Uploads
SWF DEBUG: fileClassName=Image
SWF DEBUG: controllerID=15
SWF DEBUG: dataObjectFieldName=BildspelsBilder
SWF DEBUG: fileFieldName=Bild
SWF DEBUG: dataObjectClassName=CarshowImage
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG:

Avatar
MarcusDalgren

Community Member, 288 Posts

5 August 2010 at 10:51pm

Edited: 05/08/2010 10:54pm

For those of you ending up in a shared hosting environment where session.only_use_cookies is turned on and you can't change it, put this in your _config.php.

if (isset($_POST["PHPSESSID"])) Session::start($_POST["PHPSESSID"]);

Since the config files actually gets loaded before main.php runs Session::start() this actually works. However I don't know how big of a security issue (if any) this is. If it's not then this works just as well in swfuploads _config.php which might be a more "natural" place for it. What do you think UncleCheese?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

6 August 2010 at 1:20am

Smurkas, have you confirmed that you can start a session that way? If that's the case, then, yes, we may have solved this problem.