7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Fatal error: Using $this when not in object context
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 2121 Views |
-
Fatal error: Using $this when not in object context

26 September 2009 at 4:43am
Using SilverStripe 2.3.3-rc2 with dataobject_manager, swfupload and userforms 0.2.0 modules.
Fatal error: Using $this when not in object context in /var/www/dev/indiansprings/silverstripe/sapphire/forms/FormField.php on line 536
# Time Memory Function Location
1 0.0006 87736 {main}( ) ../main.php:0
2 0.0022 180556 require_once( '/var/www/dev/silverstripe/sapphire/core/Core.php' ) ../main.php:61
3 0.0154 974440 ManifestBuilder::include_manifest( ) ../Core.php:150
4 0.0319 1862388 require_once( '/tmp/silverstripe-cache-var-www-dev-silverstripe/manifest-main' ) ../ManifestBuilder.php:70
5 0.1348 10495848 require_once( '/var/www/dev/silverstripe/mysiteconfig.php' ) ../manifest-main:7442
6 0.1560 11719572 FormField::debug( ) ../_config.php:27 -
Re: Fatal error: Using $this when not in object context

26 September 2009 at 5:16am
Can you give me some context? What were you doing? None of the files listed there are in the DOM module. Are you sure this is a DOM related bug?
-
Re: Fatal error: Using $this when not in object context

26 September 2009 at 5:50am
Yes a reply! Thanks.
The website was working fine locally I got this error after I turned on SWFUploadField::debug(); I pushed it to the test server and I wasn't able to upload images. I got a different error. When looking through the forums I found an article that said this was a common problem with the swfupload module and to turn on the debugging so now I get that error. Again its only on the test server and not locally.
This error is on any page. home, faq, admin etc.
Only way I can see the website is if I remove SWFUploadField::debug(); in which the site will work but again wont let me upload images/files.
-
Re: Fatal error: Using $this when not in object context

26 September 2009 at 6:26am
You're using the wrong class. Should be
SWFUploadConfig::debug();
-
Re: Fatal error: Using $this when not in object context

26 September 2009 at 6:36am
Thank You UncleCheese,
Here is the output
---SWFUpload Instance Info---
Version: 2.2.0 Alpha
Movie Name: SWFUpload_0
Settings:
upload_url: http://dev.mediacontour.com/indiansprings/silverstripe/FileDataObjectManager_Controller/handleswfupload
flash_url: http://dev.mediacontour.com/indiansprings/silverstripe/swfupload/javascript/swfupload.swf?swfuploadrnd=577062520
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.mediacontour.com/indiansprings/silverstripe/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: trueSWF 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.mediacontour.com/indiansprings/silverstripe/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=Files
SWF DEBUG: dataObjectClassName=File
SWF DEBUG: dataObjectFieldName=
SWF DEBUG: controllerID=1
SWF DEBUG: hasDataObject=0
SWF DEBUG: fileClassName=File
SWF DEBUG: parentIDName=ParentID
SWF DEBUG: OverrideUploadFolder=assets/Uploads/
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=Files
SWF DEBUG: Global Post Item: dataObjectClassName=File
SWF DEBUG: Global Post Item: dataObjectFieldName=
SWF DEBUG: Global Post Item: controllerID=1
SWF DEBUG: Global Post Item: hasDataObject=0
SWF DEBUG: Global Post Item: fileClassName=File
SWF DEBUG: Global Post Item: parentIDName=ParentID
SWF DEBUG: Global Post Item: OverrideUploadFolder=assets/Uploads/
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://dev.mediacontour.com/indiansprings/silverstripe/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 401.
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Error Code: -200, File name: 1.jpg, File size: 13562, Message: 401 -
Re: Fatal error: Using $this when not in object context

26 September 2009 at 7:07am
SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 401.
| 2121 Views | ||
|
Page:
1
|
Go to Top |

