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: 7117 Views
  • UncleCheese
    Avatar
    4085 Posts

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

    Turn on SWFUpload debugging in your _config.php

    SWFUploadConfig::debug();

    Upload a file, and post the output.

  • Graphicator
    Avatar
    Community Member
    62 Posts

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

    It is not the module's error. A change in the Sapphire directory will fix it from being stuck in 'processing' I had the same problem tonight and resolved the problem with this fix: http://open.silverstripe.org/attachment/ticket/5547/2.4.0-FileUpload.diff

    Found this discussion here to help: http://silverstripe.org/general-questions/show/281744?start=8

  • Jeremy
    Avatar
    Community Member
    1 Post

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

    I'm also having this problem. I've done the fix as linked above, which got other uploads working, but not the swfupload. The strange thing is that it works fine on my local test server, but not on my web host's? So I'm guessing it's just a PHP setting causing it but haven't been able to work out which one.

    ---SWFUpload Instance Info---
    Version: 2.2.0 Alpha
    Movie Name: SWFUpload_0
    Settings:
       upload_url: http://*domain*/FileDataObjectManager_Controller/handleswfupload
       flash_url: http://*domain*/swfupload/javascript/swfupload.swf?swfuploadrnd=621986462
       use_query_string: false
       file_post_name: swfupload_file
       post_params: [object Object]
       file_types:
       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://*domain*/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://*domain*/FileDataObjectManager_Controller/handleswfupload
    SWF DEBUG: File Types String: *.*
    SWF DEBUG: Parsed File Types:
    SWF DEBUG: File Types Description: ()
    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: dataObjectFieldName=
    SWF DEBUG: dataObjectClassName=File
    SWF DEBUG: hasDataObject=0
    SWF DEBUG: OverrideUploadFolder=assets/News-article-images/
    SWF DEBUG: fileClassName=File
    SWF DEBUG: fileFieldName=Files
    SWF DEBUG: PHPSESSID=tmuhtrt8ba48cjah75gfk8gk71
    SWF DEBUG: parentIDName=ParentID
    SWF DEBUG: controllerID=6
    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: dataObjectFieldName=
    SWF DEBUG: Global Post Item: dataObjectClassName=File
    SWF DEBUG: Global Post Item: hasDataObject=0
    SWF DEBUG: Global Post Item: OverrideUploadFolder=assets/News-article-images/
    SWF DEBUG: Global Post Item: fileClassName=File
    SWF DEBUG: Global Post Item: fileFieldName=Files
    SWF DEBUG: Global Post Item: PHPSESSID=tmuhtrt8ba48cjah75gfk8gk71
    SWF DEBUG: Global Post Item: parentIDName=ParentID
    SWF DEBUG: Global Post Item: controllerID=6
    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://*domain*/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 854. Total: 854

    Any help would be most appreciated

  • Graphicator
    Avatar
    Community Member
    62 Posts

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

    I went through the troubleshooting for swfupload because I ran into a problem with the FileDataobjectManager.php.
    When Uploading a pdf... I ran the die(hello) and found the error caused by this line

    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://.....com/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 32768. Total: 137666
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 98304. Total: 137666
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 131072. Total: 137666
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 137666. Total: 137666
    SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 500.
    SWF DEBUG: Event: uploadComplete : Upload cycle complete.
    Error Code: -200, File name: 2007 Form 5500 Schedule I-Financial Information -- Small Plan.pdf, File size: 137666, Message: 500

    $ownerID = $_POST['parentIDName'];

    found in:

    $file->OwnerID = Member::currentUserID();
             if($hasDataObject) {
                $file->write();
                $obj = new $do_class();      
                $obj->$idxfield = $file->ID;
                $ownerID = $_POST['parentIDName'];
                $obj->$ownerID = $_POST['controllerID'];
                $obj->write();
                echo $obj->ID;
             }

  • Graphicator
    Avatar
    Community Member
    62 Posts

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

    Disregard the previous post, I fixed it shortly after...

    From looking at what parentIDname is populated from... the source class.
    I changed my Class name from 'TaxForms.php'->class TaxForms to 'Tdocuments.php'->class Tdocuments

    Having two uppercaps in the source name seemed to be the problem for me. Is there a mention of that in the docs that I overlooked? I also was hesitant to create a class named Form, or Document. Aren't there names I should avoid?

  • martinluff
    Avatar
    Community Member
    4 Posts

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

    Yes, I'm getting the same problem (have also tried applying the patches to Sapphire but makes no difference to this issue).

    Once file upload is initiated then the progress bar gets stuck on 'Processing...' I tested on live Unix server (LAMP stack) and no problems at all with same builds of SilverStripe 2.4, SWFupload and Data Object Manager. The problem is on my dev server (Windows 7 using the popular WAMP server...) Thanks in advance...

    SWF debug info:

    ---SWFUpload Instance Info---
    Version: 2.2.0 Alpha
    Movie Name: SWFUpload_0
    Settings:
       upload_url: http://ss24b.dev/FileDataObjectManager_Controller/handleswfupload
       flash_url: http://ss24b.dev/swfupload/javascript/swfupload.swf?swfuploadrnd=850275533
       use_query_string: false
       file_post_name: swfupload_file
       post_params: [object Object]
       file_types:
       file_types_description:
       file_size_limit: 2MB
       file_upload_limit: 20
       file_queue_limit: 20
       debug: true
       prevent_swf_caching: true
       button_placeholder_id: spanButtonPlaceholder
       button_image_url: http://ss24b.dev/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://ss24b.dev/FileDataObjectManager_Controller/handleswfupload
    SWF DEBUG: File Types String: *.*
    SWF DEBUG: Parsed File Types:
    SWF DEBUG: File Types Description: ()
    SWF DEBUG: File Size Limit: 2097152 bytes
    SWF DEBUG: File Upload Limit: 20
    SWF DEBUG: File Queue Limit: 20
    SWF DEBUG: Post Params:
    SWF DEBUG: parentIDName=ParentID
    SWF DEBUG: hasDataObject=0
    SWF DEBUG: OverrideUploadFolder=assets/upload/
    SWF DEBUG: controllerID=1
    SWF DEBUG: PHPSESSID=4dmllt2m0rdo3mtsget8eb5j61
    SWF DEBUG: dataObjectClassName=File
    SWF DEBUG: fileFieldName=Files
    SWF DEBUG: dataObjectFieldName=
    SWF DEBUG: fileClassName=File
    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: parentIDName=ParentID
    SWF DEBUG: Global Post Item: hasDataObject=0
    SWF DEBUG: Global Post Item: OverrideUploadFolder=assets/upload/
    SWF DEBUG: Global Post Item: controllerID=1
    SWF DEBUG: Global Post Item: PHPSESSID=4dmllt2m0rdo3mtsget8eb5j61
    SWF DEBUG: Global Post Item: dataObjectClassName=File
    SWF DEBUG: Global Post Item: fileFieldName=Files
    SWF DEBUG: Global Post Item: dataObjectFieldName=
    SWF DEBUG: Global Post Item: fileClassName=File
    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://ss24b.dev/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 262561. Total: 262561

  • UncleCheese
    Avatar
    4085 Posts

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

    Due to a security hole, we had to patch the FileDataObjectManager_Controller::handleswfupload(); function to be behind authentication. In order to keep the session alive in the Flash request, a session_id parameter was added in swfupload. Therefore, with the latest version of DOM, you need to have the latest version of SWFUpload as well.

    Ensure that line 20 of SWFUploadField.php reads:

          SWFUploadConfig::addPostParam('PHPSESSID',session_id());         

    And make sure that the PHP setting "session.use_only_cookies" is set to off.

  • martinluff
    Avatar
    Community Member
    4 Posts

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

    Solved - thanks for the very quick response UncleCheese

    Switching off the session.use_only_cookies sorted the issue... (was already using up-to-date version of SWFupload) *cool

    7117 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.