CuteWebUI AjaxUploader Initialize is not defined BLOCKED SCRIPTalert('TODO:FIXME')

Last post 02-28-2011, 6:00 PM by daryl_bb. 10 replies.
Sort Posts: Previous Next
  •  10-21-2009, 6:35 AM 56549

    CuteWebUI AjaxUploader Initialize is not defined BLOCKED SCRIPTalert('TODO:FIXME')

    CuteWebUI AjaxUploader Initialize is not defined
     
    BLOCKED SCRIPTalert('TODO:FIXME')
     
    in php file uploader
     
    iam getting above error at the time of page loading.
     
    Can you please give me your suggestions and help me from this debug.
  •  10-21-2009, 6:47 AM 56550 in reply to 56549

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi,
     
    Please check the generated HTML code ,
     
    there should be something like <script type='text/javascript' src='/demo/phpuploader/ajaxuploaderresource.php?type=script'></script>
     
    Please check whether the ajaxuploaderresource.php?type=script could render the script or not.
     
    Regards,
    Terry
     
  •  10-21-2009, 7:03 AM 56552 in reply to 56550

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi Terry,
     
    <script type='text/javascript' src='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderresource.php?type=script'></script> 
     
    iam getting above generated html code.
     
    <?php                                       
                                            $uploader->Name="myuploader";   
                                            $uploader->InsertText="Select multiple files (Max 10M)";                                   
                                        
                                            $uploader->AllowedFileExtensions="jpeg,jpg,gif,png";
                                            $uploader->MultipleFilesUpload=true;    
                                            $uploader->ManualStartUpload=true;
                                         
                                            $uploader->Render();                                     
                                        ?>
     
    iam calling php uploader using above code .
     
    Once please go through the above code.
     
    Thank you for helping but still iam facing same problem.
     
  •  10-21-2009, 7:11 AM 56554 in reply to 56552

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi,
     
    The problem is the server generated wrong path :
     
    homepages/31/d288600241/htdocs/test/phpuploader/
     
    Can you debug it ? open include_phpuploader.php , and find the
     
    function GetWebPath($pfile)
     
    this function use SCRIPT_FILENAME,SCRIPT_NAME,__FILE__ to calculate the virtual path.
     
    --
     
    BTW , are you using the last version , when do you download the uploader ?
     
    One of the old version has bug on that function , Please make sure you are using the newest version.
     
    Regards,
    Terry
  •  10-21-2009, 8:16 AM 56558 in reply to 56554

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi Terry,
     
     
    We rectified the wrong path error. 
     
    BTW we are getting new error. please check the below screen shot and can you give me the fast reply.
     

     
  •  10-21-2009, 8:33 AM 56559 in reply to 56558

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi,
     
    That is a similiar error.
     
    The uploader calculate the wrong path, so the server will return 404 error , and uploader show a wrong message.
     
    Can you post the HTML which the uploader generated ?
     
    Regards,
    Terry
     
  •  10-21-2009, 8:38 AM 56560 in reply to 56559

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi Terry,
     
    Below html code iam getting at the time of uploader.
     
    <button id='myuploaderButton' onclick='return false;'>Select multiple files (Max 10M)</button><input type='hidden' id='myuploader' name='myuploader' autocomplete='off' /><script type='text/javascript' src='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderresource.php?type=script'></script><img id='AjaxUploaderFiles_Loader' UniqueID='myuploader'  Namespace='CuteWebUI' UploadModuleNotInstall='1' ServerLang='PHP' src='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderresource.php?type=file&amp;file=continuous.gif' InsertButtonID='myuploaderButton' ResourceDirectory='homepages/31/d288600241/htdocs/test/phpuploader/resources' ResourceHandler='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderresource.php' UploadUrl='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderhandler.php' Extensions='jpeg,jpg,gif,png' MaxHttpSizeKB='20480' CancelUploadMsg='Cancel upload' CancelAllMsg='Cancel all Uploads' UploadingMsg='Uploading..' UploadType='Auto' ManualStartUpload='1' MultipleFilesUpload='1' ShowProgressBar='1' ShowProgressInfo='1' NumFilesShowCancelAll='2' PanelWidth='360' BarHeight='20' InfoStyle='padding-left:3px;font:normal 12px Tahoma;' BarStyle='Continuous' BorderStyle='border-style:solid;border-width:1px;border-style:#444444;' onload='this.style.display=&quot;none&quot; ; CuteWebUI_AjaxUploader_Initialize(this.id);' onerror='this.onload()' ContextValue='TODO' />
     
  •  10-21-2009, 8:50 AM 56561 in reply to 56560

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi,
     
    I think the properties
     
    ResourceDirectory='homepages/31/d288600241/htdocs/test/phpuploader/resources'
    ResourceHandler='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderresource.php'
    UploadUrl='homepages/31/d288600241/htdocs/test/phpuploader/ajaxuploaderhandler.php'
     
    are wrong.
     
    I don't know how you fix the script path issue,
     
    but maybe you need also fix these kinds of issue.
     
    this line get wrong data :
     
    $cd=dirname($this->GetWebPath(__FILE__));
     
    Regards,
    Terry
     
  •  10-21-2009, 9:11 AM 56563 in reply to 56561

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi Terry,
     
    We corrected the path like as $cd='/test/phpuploader';
     
    We solved the issue what ever we have discussed with you up to now.
     
    Thank you for spending your valuable time to share my problem.
  •  10-21-2009, 9:25 AM 56566 in reply to 56563

    Re: CuteWebUI AjaxUploader Initialize is not defined in php file uploader

    Hi,
     
    Glad to know you have find a solution.
     
    Could you help us to understand you case ?
     
     <?php echo $_SERVER['SCRIPT_FILENAME']; ?>
     <br/>
     <?php echo __FILE__; ?>
     <br/>
     <?php echo $_SERVER['SCRIPT_NAME']; ?>
     
    Could you run this code an tell me the output ?
     
    Thanks.
     
    Regards,
    Terry
     
  •  02-28-2011, 6:00 PM 66478 in reply to 56549

    Re: CuteWebUI AjaxUploader Initialize is not defined BLOCKED SCRIPTalert('TODO:FIXME')

    I spoke with Eric in Live Chat today and he helped me solve this problem, and I thought I'd post the resolution here.
     
    Edit cuteeditor_files/Dialogs/phpuploader/include_phpuploader.php
     
    You'll need to change the $cd  declaration in the PhpUploader() function:
     //$cd=dirname($this->GetWebPath(__FILE__));
    $cd=dirname($_SERVER['SCRIPT_NAME']).'/phpuploader';
     
    I commented out the old line for historical purposes and added the new line.  Basically some servers work fine with the GetWebPath() method and some do not.  So all of them work fine with the $_SERVER variable for the path.
     
    Hope that helps.
View as RSS news feed in XML