pixelandtonic / matrix_multi_upload

Upload multiple files to Matrix at once, powered by Plupload
36 stars 10 forks source link

New Rows are Not Being Added #10

Open gibbonsr opened 12 years ago

gibbonsr commented 12 years ago

I've installed the Multi Upload module for Matrix. Files upload correctly, but new rows are not being added to the Matrix field. Firebug is giving me the following error:

JSON.parse: unexpected character addFiles()matrix...load.js (line 153) plupload = Object /undefined/ file = Object { id="p170pqchofk33hrs5c51ffdf318", name="app.png", size=42330, more...} response = Object { response="<div style="border:1px ...p_1.png"}, "id" : "id"}", status=200} proxy()jquery...8961275 (line 39) typeOf()plupload.js (line 2) w = "FileUploaded" onload()plupload.html5.js (line 1) [Break On This Error]

response = JSON.parse(response.response);

The full value of the response variable is:

A PHP Error was encountered

Severity: Warning

Message: unlink(C:\WINDOWS\Temp\php319.tmp): Permission denied

Filename: matrix_multi_upload/mcp.matrix_multi_upload.php

Line Number: 184

{"jsonrpc" : "2.0", "result" : {"name" : "bigeasy_1.png", "thumb" : "http://ee.rusticpathways.com/assets/promotions/_thumbs/bigeasy_1.png"}, "id" : "id"} Any ideas? Thanks! Ryan
brandonkelly commented 12 years ago

Hi Ryan,

Can you make sure that your upload directory and _thumbs folder are set to 777 permissions?

gibbonsr commented 12 years ago

Hey Brandon, thanks for the quick response. Both the upload directory and the thumbs directory are set to 777 and files are being successfully uploaded and created in both of these directories by the plugin.

gibbonsr commented 12 years ago

Hey Brandon, any additional thoughts on this? We're running EE Server 2003 and IIS. Thanks.

Ryan

lackofbetterwords commented 12 years ago

I am having the exact same issues. Was anything solved?

gibbonsr commented 12 years ago

@lackofbetterwords this was solved for me when I moved from a Windows to a Linux server environment. As @brandonkelly said, your first step is certainly to check the permissions on the upload directory. Have you done that?

Sorry I don't have a better answer. Ryan

ShawnCBerg commented 11 years ago

I'm having the exact same issue. I'm also hosting the EE website on Windows Server (2008). I've verified file permissions and the files are uploading to the upload and _thumbs directory just fine. There's just no rows created in the Matrix field. I see this PHP error in Chrome Dev Tools:

A PHP Error was encountered

Severity: Warning

Message: unlink(C:\Windows\Temp\php792A.tmp): Permission denied

Filename: matrix_multi_upload/mcp.matrix_multi_upload.php

Line Number: 193

{"jsonrpc" : "2.0", "result" : {"name" : "banner2_1.png", "thumb" : "/media/event_photo_galleries/_thumbs/banner2_1.png"}, "id" : "id"} I've verified that the IUSR account on the server has full write access to the C:\Windows\Temp directory. When I check for that file after receiving this error it's not there so it must be getting deleted.
lisajill commented 11 years ago

Hey Shawn -

I missed the email notification of this. Can you email us via support@pixelandtonic.com so we can follow this up in our support system? Thank you!

MattTurnure commented 10 years ago

Hello,

I am having the same issue as ShawnCBerg.

I think this is unique to Windows Servers. Unfortunately, I am not in the position to choose my environment for my current project.

I updated my matrix_multi_upload.js file to check response.response for an HTML string (for possible PHP warnings/errors). If the response is an HTML string, I throw $.ee_notice(response.response, {type: 'error'}) and return. That solves the JS error, however, the unlink method on line 193 is where the problem starts.

I have verified user permissions and my temp folder permissions and everything looks good on that end. I tried removing the unlink method and everything is working. I do not see any evidence of the .tmp file in the file directories, but I want to make sure there is not a better solution first.