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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DOM issues


4 Posts   803 Views


27 July 2010 at 6:10pm Community Member, 21 Posts

Im getting some weird issues since upgrading to SS 2.4.1 (Can confirm the same with 2.4.0 as well).

I currently have DOM r403 and SWFUpload r414 in use.

When uploading files using the FIleDataObjectManager i run into the issue where I am unable to upload any files. From what I can tell this is due to the line 587 check


When I remove this all works fine on dev machine but logs me out (and no file upload) when on staging (same as the Live server).

After re-enabling the above code and turning debug on for SWFUpload gives me this output.

---SWFUpload Instance Info---
Version: 2.2.0 Alpha
Movie Name: SWFUpload_0
   use_query_string: false
   file_post_name: swfupload_file
   post_params: [object Object]
   file_size_limit: 20MB
   file_upload_limit: 20
   file_queue_limit: 20
   debug: true
   prevent_swf_caching: true
   button_placeholder_id: spanButtonPlaceholder
   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: Build Number: SWFUPLOAD 2.2.0 Alpha 2008-10-17
SWF DEBUG: movieName: SWFUpload_0
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: OverrideUploadFolder=projects/Test
SWF DEBUG: dataObjectClassName=ProjectItem
SWF DEBUG: controllerID=80
SWF DEBUG: parentIDName=ProjectPageID
SWF DEBUG: fileClassName=File
SWF DEBUG: PHPSESSID=2aivgv7n448pct4ajdjnps1mg6
SWF DEBUG: hasDataObject=1
SWF DEBUG: fileFieldName=AssetFile
SWF DEBUG: dataObjectFieldName=ProjectItem
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: OverrideUploadFolder=projects/Test
SWF DEBUG: Global Post Item: dataObjectClassName=ProjectItem
SWF DEBUG: Global Post Item: controllerID=80
SWF DEBUG: Global Post Item: parentIDName=ProjectPageID
SWF DEBUG: Global Post Item: fileClassName=File
SWF DEBUG: Global Post Item: PHPSESSID=2aivgv7n448pct4ajdjnps1mg6
SWF DEBUG: Global Post Item: hasDataObject=1
SWF DEBUG: Global Post Item: fileFieldName=AssetFile
SWF DEBUG: Global Post Item: dataObjectFieldName=ProjectItem
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0

The strange thing with this is it sometimes works (That is the progress bar does goes up and told that upload was successful, so additional debug lines) most of the time this doesn't work and just outputs what is above.

I am unsure why this has broken as I recall this working at least for 2.4.0 (cant confirm with 2.4.1) but even going back it seems to have broken somewhere.

The only thing I have changed is on line 393 of FileDataObjectManager.php which was throwing an error when using multiple FileIFrameFields

$total = isset($_POST['totalsize']) ? $_POST['totalsize'] : ( isset($_POST['uploaded_files']) ? sizeof($_POST['uploaded_files']) : 0 );

The above code seemed to fix that.


28 July 2010 at 1:42am 4085 Posts

Make sure the PHP setting "session_use_only_cookies" is off.


28 July 2010 at 12:09pm Community Member, 21 Posts

I knew it wasnt DOM but something I forgot thanks UncleCheese.


28 July 2010 at 5:22pm Community Member, 21 Posts

Ok seems to have a weird affect on PHP 5.2.6-1 (the debian install) which logs me out when uploading a file. Works fine on my source install server. Playing around to see what the issue is exactly.