matrix_multi_upload icon indicating copy to clipboard operation
matrix_multi_upload copied to clipboard

New Rows are Not Being Added

Open gibbonsr opened this issue 12 years ago • 8 comments

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

gibbonsr avatar Jun 28 '12 15:06 gibbonsr

Hi Ryan,

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

brandonkelly avatar Jun 28 '12 19:06 brandonkelly

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 avatar Jun 29 '12 14:06 gibbonsr

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

Ryan

gibbonsr avatar Jul 15 '12 18:07 gibbonsr

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

lackofbetterwords avatar Nov 06 '12 21:11 lackofbetterwords

@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

gibbonsr avatar Nov 07 '12 02:11 gibbonsr

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.

ShawnCBerg avatar Apr 15 '13 15:04 ShawnCBerg

Hey Shawn -

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

lisajill avatar Apr 25 '13 19:04 lisajill

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.

MattTurnure avatar Nov 12 '14 15:11 MattTurnure