Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Upload image stuck in "Processing"

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4
Go to End
Author Topic: 7021 Views
  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Upload image stuck in "Processing" Link to this post

    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]

  • UncleCheese
    Avatar
    4085 Posts

    Re: Upload image stuck in "Processing" Link to this post

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

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Upload image stuck in "Processing" Link to this post

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

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Upload image stuck in "Processing" Link to this post

    Wait, do you mean SS or the SWFUpload module?

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Upload image stuck in "Processing" Link to this post

    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?

  • elsbth
    Avatar
    Community Member
    8 Posts

    Re: Upload image stuck in "Processing" Link to this post

    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:

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Upload image stuck in "Processing" Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Upload image stuck in "Processing" Link to this post

    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.

    7021 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.