Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Am checking out media module in combination with plupload.
I guess they are mutually dependent, at least plupload probably needs media to work.
Downloaded all dependencies, mostly used HEAD versions, might be risky, I know. I get this error when trying to batch upload Images:
* The specified file temporary://p15cu23j8t4q89i19lp1dem5og1.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1285204079 ) in drupal_write_record() (line 6271 of D:\xampp-neu\htdocs\test\drupal-head-media\includes\common.inc).
Comment | File | Size | Author |
---|---|---|---|
#29 | eror.PNG | 41.78 KB | alimalik |
#5 | plupload-920038.patch | 798 bytes | Jackinloadup |
Comments
Comment #1
eigentor CreditAttribution: eigentor commentedForgot to say: this is me testing it on a local Windows 7 machine with Xampp as my web server.
Comment #2
rodenp CreditAttribution: rodenp commentedI have exactly the same issue.
* The specified file temporary://p15d4nljqis1518qk25230f12ua1.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1285428010 ) in drupal_write_record() (line 6244 of X:\websites\dev.site1.com.au\includes\common.inc).
Comment #3
gregglesEither Jacob or Effulgentsia should look at this. I'll choose Jacob...
Comment #4
Jackinloadup CreditAttribution: Jackinloadup commentedSame issue
Comment #5
Jackinloadup CreditAttribution: Jackinloadup commentedI did find the source of the problem, but I don't know a solution. I'm not sure why this 'security check' is in place.
offending lines:
plupload.module around line 251 where it says
// Check the file name for security reasons
This patch comments this out and gets the module to function... maybe not securely.. lawl
Comment #6
Jackinloadup CreditAttribution: Jackinloadup commentedBump, has anyone used the patch I provided above?
Comment #7
TechDragon CreditAttribution: TechDragon commentedManually made the changes to plupload.module.
Tested Successfully. Uploads are now succeeding where they were previously failing.
However i cant speak of any security implications. Can someone more familiar with the module comment on the security implications?
:: Edit ::
Scratch that. Same issue seems to have cropped up again. Uploads are stalling shortly after starting again.
I'm going to turn on more logging & see what I can dig up.
Comment #8
Jackinloadup CreditAttribution: Jackinloadup commented@TechDragon hmm interesting. Post up any information you find out. I haven't run into a stalling issue myself. Though I think that a stalling issue would probably be unrelated to the original bug request.
Are you still getting that error?
Comment #9
TechDragon CreditAttribution: TechDragon commentedSeems to stall after about 50-100KB of the file is uploaded and so far i cant seem to find any specific errors.
It stalls trying to upload more images into a gallery. The first upload of content into a gallery works fine for any number of items.
Seems like you might be right about a different bug. Possibly one related to media gallery.
Comment #10
Jackinloadup CreditAttribution: Jackinloadup commentedWell it sounds like it is still related to Plupload but just not the same issue. Open a new issue about uploads stalling with your info. Is this problem consistant for you across browsers and computers. Also if possible try to test it on a different connection. I'm just thinking about eliminating other sources of issues.
We just need a module maintainer to take a review this patch and resolve the security issue.
Thanks for the help everyone.
Comment #11
Scott J CreditAttribution: Scott J commentedEigentor and Rodenp, what browser are you using?
I have this error if using Firefox, but no problem with IE 8. So perhaps this happens only with HTML5 method?
Comment #12
rodenp CreditAttribution: rodenp commentedI get the error using both firefox and chrome. However with ie when i drag a number of files from the file browser to the drop window I get taken immediately to the actual location of the first uploaded file, rather than back to the upload screen with the files awaiting me click on 'start upload'. For example I am uploading a group of files from Windows 7 under Apache from my pictures library and when i drop the files I am taken to C:\Users\Peter\Pictures\1PIP.jpg.
I did as jackinloadup suggested in #5 (commenting out security test) and it appears to work with firefox and chrome.
Comment #13
Ryanbach CreditAttribution: Ryanbach commentedThis is an issue that only seems to happen on HTML5. #5 patch works well. The code may need to be fixed instead of commented out, however.
Comment #14
Ryanbach CreditAttribution: Ryanbach commentedSet to correct priority.
Comment #15
Ryanbach CreditAttribution: Ryanbach commentedNote: 5 fixes stalling error when using HTML5 but it does not fix the
"* The specified file temporary://filename.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename." error.
Comment #16
Christopher James Francis Rodgers CreditAttribution: Christopher James Francis Rodgers commented2015.03.16 - Updated
Per my experiences, and research
4-years ago:
The 'Final' solution that always worked was:
All you really need to do if you are having problems
is to remove the forward-slash ("/") from "/tmp"
and specify...
tmp
...only, at --> [Your-D7-root-home] » Administration » Configuration » Media: File system » Temporary directory.
Comment #17
rikclout CreditAttribution: rikclout commentedsubscribing
Comment #18
Christopher James Francis Rodgers CreditAttribution: Christopher James Francis Rodgers commentedI corrected my post above to reflect a better solution.
The details are at http://drupal.org/node/1106492.
Comment #19
Christopher James Francis Rodgers CreditAttribution: Christopher James Francis Rodgers commentedComment #20
David_Rothstein CreditAttribution: David_Rothstein commentedAs others already pointed out above, we can't commit a patch that just removes that security feature altogether.
Please try the latest patch at #953242: Undefined $i wreaks havoc in plupload_element_value(). I think there is a good chance it will resolve the issue reported here also.
Comment #21
ay13 CreditAttribution: ay13 commentedI just wanted to mention something that fixed the issue for me. The latest version of plupload (1.4.2) seems to be one of the problems. I installed plupload 1.2.3 after seeing that is what Drupal Gardens uses and it works fine. Could be an issue of something changing in the newer release that the module isn't accounting for.
Comment #22
David_Rothstein CreditAttribution: David_Rothstein commentedYup, that's exactly what's addressed in the issue I linked to above... the patch there should make the module work with 1.4.2 as well.
I'm pretty sure these issues are duplicates of each other, so for now, I'm closing this one. (We can reopen it if people are still experiencing problems even after using the patch from the other issue.)
Comment #23
alimalik CreditAttribution: alimalik commentedi am having the same issue:
The specified file temporary://p17r3dallare9p4u17d5tle8e4.tmp could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp, type) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1369135475 [:db_insert_placeholder_7] => default ) in drupal_write_record() (line 6988 of /home/content/s/k/e/skelsmerghpc/html/test/includes/common.inc).
Comment #24
slashrsm CreditAttribution: slashrsm commentedIt seems like the uploaded file is not where it should be. Are you sure file uploaded correctly? Is webserver allowed to write in temporary files folder? Do you have multi-server environment?
Comment #25
alimalik CreditAttribution: alimalik commentedWell server is allowed to write temporary files as all folders have 777 permissions. no there is not multi-server environment. i am uploading the file from my local machine
Comment #26
alimalik CreditAttribution: alimalik commentedHi slashrsm
I have checked all the permissions for the directories which have images. they are all set to 777 permissions and also our environment is multi-server which may be the reason.
please suggest me any suitable solution.
Any help shall be highly appriciated
Comment #27
slashrsm CreditAttribution: slashrsm commentedIn multi-server be sure that temp files folder shares across all servers.
Comment #28
alimalik CreditAttribution: alimalik commented@slashrsm Do you think its only permission issue?
Comment #29
alimalik CreditAttribution: alimalik commentedPlease see my screenshot
Comment #30
slashrsm CreditAttribution: slashrsm commentedI would say that it's permissions issue or wrong configuration of your multi-server env.
Comment #31
alimalik CreditAttribution: alimalik commentedyes you are right . it was issue with temp path. it is fixed now
thank you slashrsm
Comment #32
prophet108 CreditAttribution: prophet108 commentedIf you are hosted on Acquia cloud, you can use this module that was written to solve this issue: https://www.drupal.org/project/acquia_cloud_sticky_sessions
Comment #33
Christopher James Francis Rodgers CreditAttribution: Christopher James Francis Rodgers commented.
Per my experiences, and research 4-years ago:
The 'Final' solution that always worked was:
All you really need to do if you are having problems
is to remove the forward-slash ("/") from "/tmp"
and specify...
tmp
...only, at --> [Your-D7-root-home] » Administration »
Configuration » Media: File system » Temporary directory.
.
===
The page link below is to the original issue page
that I was working with. I did try to keep track of,
and update all other pages related to the issue,
but it would appear that I missed this page
with my 'Final' solution.
Sorry.
I certainly hope the solution above
may be of benefit to you.
===
Original issue page, aka, the 'train-wreck' :o)
D7 Manual Webhost Install Errors from "/tmp" - the default
"Temporary directory" in "Media: Filesystem" - Solution.
See http://drupal.org/node/1106492