[fixed] Drag and drop gives wrong json response

Post Reply
deactivated010521

[fixed] Drag and drop gives wrong json response

Post by deactivated010521 »

Rev: 8071

When dropping a file on the 'upload' zone (top right corner) the dashed retancle blinks green.. the percentage indicator is changing but the file is not uploaded.

On Content -> File Manager [Upload files]-tab the dashed dropzone gives no feedback when dropping a file. No file is uploaded.

Os: Windows 7

HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

By looking at the json response from FireBug I saw:

Code: Select all

-----------------------------4827543632391 Content-Disposition: form-data; name="mact" FileManager,m33f11,upload,0 -----------------------------4827543632391 Content-Disposition: form-data; name="_sx_" 8583d4f7 -----------------------------4827543632391 Content-Disposition: form-data; name="disable_buffer" 1 -----------------------------4827543632391 Content-Disposition: form-data; name="m33f11files[]"; filename="31122011045.jpg" Content-Type: image/jpeg

[{"name":"31122011045.jpg","size":false,"type":"image\/jpeg","delete_url":"http:\/\/beta.biesheuvel.lan\/admin\/class.jquery_upload_handler.php?file=31122011045.jpg","delete_type":"DELETE"}]
Same result with a .pdf file:

Code: Select all

[{"name":"test_2012.pdf","size":false,"type":"application\/pdf","delete_url":"http:\/\/beta.biesheuvel.lan\/admin\/class.jquery_upload_handler.php?file=test_2012.pdf","delete_type":"DELETE"}]

ad1) Same response for Google Chrome:

HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5

Code: Select all

 {name:test_2012.pdf, size:false, type:application/pdf,…}
delete_type: "DELETE"
delete_url: "http://beta.biesheuvel.lan/admin/class.jquery_upload_handler.php?file=test_2012.pdf"
name: "test_2012.pdf"
size: false
type: "application/pdf"
ad2) The good ;D Internet Explorer 9 does not show a dropzone at all (probally that is by design)

HTTP_USER_AGENT: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;NLNL)


If you need more feedback or information let me know.
uniqu3

Re: Drag and drop gives wrong json response

Post by uniqu3 »

Rev 8071

Works for me in FF12 and Chrome 19 on Win7, file is uploaded by using dropzone in Theme or in FileManager (pdf. zip, tar.gz, jpeg).

IE9 was excluded from this joy by intention.

My System info
----------------------------------------------
Cms Version: 1.11-beta1
Installed Modules:
AceEditor: 0.2.3.2
CMSMailer: 5.2.1
CMSPrinting: 1.0.2
FileManager: 1.4.0
MenuManager: 1.8.2
MicroTiny: 1.2.1
ModuleManager: 1.5.4
News: 2.12.7
Search: 1.7.6
ThemeManager: 1.1.6

Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 32000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.3.9
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 60
output_buffering: 1
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 32M
session_save_path: D:/Localhost/tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.20
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

----------------------------------------------
deactivated010521

Re: Drag and drop gives wrong json response

Post by deactivated010521 »

Tested both the dropzone in the theme as the dropzone in the FileManager both not working with above mentioned browsers and setup.

Good to have confirmed that IE9 is excluded by intention.

for the record:

Code: Select all

----------------------------------------------

Cms Version: [b]1.11-beta1[/b]

Installed Modules:

    CMSMailer: [b]5.2.1[/b]
    CMSPrinting: [b]1.0.2[/b]
    FileManager: [b]1.4.0[/b]
    MenuManager: [b]1.8.2[/b]
    MicroTiny: [b]1.2.1[/b]
    ModuleManager: [b]1.5.4[/b]
    News: [b]2.12.7[/b]
    Search: [b]1.7.6[/b]
    ThemeManager: [b]1.1.6[/b]


Config Information:

    php_memory_limit: [b][/b]
    process_whole_template: [b][/b]
    output_compression: [b][/b]
    max_upload_size: [b]10000000[/b]
    url_rewriting: [b]none[/b]
    page_extension: [b][/b]
    query_var: [b]page[/b]
    image_manipulation_prog: [b]GD[/b]
    auto_alias_content: [b]true[/b]
    locale: [b][/b]
    default_encoding: [b]utf-8[/b]
    admin_encoding: [b]utf-8[/b]
    set_names: [b]true[/b]


Php Information:

    phpversion: [b]5.3.3-7+squeeze13[/b]
    md5_function: [b]On[/b] (True)
    gd_version: [b]2[/b]
    tempnam_function: [b]On[/b] (True)
    magic_quotes_runtime: [b]Off[/b] (False)
    E_STRICT: [b]0[/b]
    E_DEPRECATED: [b]0[/b]
    memory_limit: [b]128M[/b]
    max_execution_time: [b]60[/b]
    output_buffering: [b]4096[/b]
    safe_mode: [b]Off[/b] (False)
    file_uploads: [b]On[/b] (True)
    post_max_size: [b]10M[/b]
    upload_max_filesize: [b]10M[/b]
    session_save_path: [b]/var/lib/php5[/b] (1733)
    session_use_cookies: [b]On[/b] (True)
    xml_function: [b]On[/b] (True)
    xmlreader_class: [b]On[/b] (True)


Server Information:

    Server Api: [b]apache2handler[/b]
    Server Db Type: [b]MySQL (mysqli)[/b]
    Server Db Version: [b]5.1.61[/b]
    Server Db Grants: [b]Found a "GRANT ALL" statement that appears to be suitable[/b]

deactivated010521

Re: Drag and drop gives wrong json response

Post by deactivated010521 »

Did some more testing on the drag and drop functionality now the apache error log's open.

Do you notice the "/public/public/" the server path is not read out correctly. Just using the default config.php

Code: Select all

[Thu Jun 21 13:04:24 2012] [error] [client 192.168.2.12] PHP Warning:  move_uploaded_file(/home/shared/web/beta/public/public/uploads/images/home_01.jpg): failed to open stream: No such file or directory in /home/shared/web/beta/public/modules/FileManager/lib/class.jquery_upload_handler.php on line 225, referer: http://beta.biesheuvel.lan/admin/imagefiles.php?_sx_=f5d70e9f
[Thu Jun 21 13:04:24 2012] [error] [client 192.168.2.12] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/php1rKAB5' to '/home/shared/web/beta/public/public/uploads/images/home_01.jpg' in /home/shared/web/beta/public/modules/FileManager/lib/class.jquery_upload_handler.php on line 225, referer: http://beta.biesheuvel.lan/admin/imagefiles.php?_sx_=f5d70e9f
[Thu Jun 21 13:04:24 2012] [error] [client 192.168.2.12] PHP Warning:  filesize(): stat failed for /home/shared/web/beta/public/public/uploads/images/home_01.jpg in /home/shared/web/beta/public/modules/FileManager/lib/class.jquery_upload_handler.php on line 235, referer: http://beta.biesheuvel.lan/admin/imagefiles.php?_sx_=f5d70e9f
ad1) Nothing wrong with my apache config:

Code: Select all

DocumentRoot /home/shared/web/beta/public/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <Directory /home/shared/web/beta/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
deactivated010521

Re: Drag and drop gives wrong json response

Post by deactivated010521 »

Rev: 8100

Ok did a fresh install tryed the drag and drop functionality and it worked perfectly.

So why did it not work before?

I made a change in Content -> File Manager -> Settings:

[x] Lets you gain access to whole cmsms filesystem, not just /uploads/ (if allowed) <--- file upload, drag and drop does not work

Code: Select all

[Sun Jun 24 11:15:23 2012] [error] [client 192.168.2.12] PHP Warning:  move_uploaded_file(/home/shared/web/beta/public/public/uploads/images/p1000403.jpg): failed to open stream: No such file or directory in /home/shared/web/beta/public/modules/FileManager/lib/class.jquery_upload_handler.php on line 225, referer: http://beta.biesheuvel.lan/admin/moduleinterface.php?mact=FileManager,m1_,defaultadmin,0&_sx_=6f88e402

[] Lets you gain access to whole cmsms filesystem, not just /uploads/ (if allowed) <--- "default setting" file upload, drag and drop does work

Can anybody test this also?
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Drag and drop gives wrong json response

Post by Rolf »

Confirmed, good catch Arnoud
[Sun Jun 24 11:24:56 2012] [error] [client 127.0.0.1] PHP Warning: move_uploaded_file(C:\\www\\trunk/trunk/uploads/gewicht-groenten.pdf) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: No such file or directory in C:\\www\\trunk\\modules\\FileManager\\lib\\class.jquery_upload_handler.php on line 225, referer: http://localhost/trunk/admin/moduleinte ... _=b5b5ba94

[Sun Jun 24 11:24:56 2012] [error] [client 127.0.0.1] PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for C:\\www\\trunk/trunk/uploads/gewicht-groenten.pdf in C:\\www\\trunk\\modules\\FileManager\\lib\\class.jquery_upload_handler.php on line 235, referer: http://localhost/trunk/admin/moduleinte ... _=b5b5ba94
Filesize 10kB
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
deactivated010521

Re: [reproduced] Drag and drop gives wrong json response

Post by deactivated010521 »

Rev: 8102 confirmed fix
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [reproduced] Drag and drop gives wrong json response

Post by Rolf »

fixed in rev. 8105
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Closed Issues”