Been messing with the discussion plugin trying to post images/files in the main post and replies. Keeps throwing this error after I upload it and give it a title (made sure I had my folder permissions set up).
Notice: Undefined property: stdClass::$uri in file_save() (line 566 of /var/www/vhosts/ghostinteractive.com/subdomains/atrium2/includes/file.inc).
Notice: Undefined property: stdClass::$uri in file_entity_file_presave() (line 14 of /var/www/vhosts/ghostinteractive.com/subdomains/atrium2/profiles/openatrium/modules/contrib/file_entity/file_entity.file.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (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); Array ( [:db_insert_placeholder_0] => application/octet-stream [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => 1367956409 [:db_insert_placeholder_4] => image ) in drupal_write_record() (line 7165 of /var/www/vhosts/ghostinteractive.com/subdomains/atrium2/includes/common.inc).
Note: I have not updated any of the modules besides updating the OA core from alpha2 ~ alpha3.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screen Shot 2013-05-22 at 4.35.11 PM.png | 338.96 KB | duckydan |
Comments
Comment #1
mpotter commentedCan you give me step-by-step procedure for reproducing this? I don't know if you are using the embed button in the WYSIWYG or if you are using the Attachments field at the bottom.
Comment #2
mpotter commentedComment #3
duckydan commentedHi, I am having this same error. I am on Alpha 5. I have tried three server. I have tried the drush make files, the build.sh script, just downloading the distro and installing. I have verified permissions over and over.
I so very much wanted to get this running so my library would use it for all our web projects, but I can't even install OA 2.
Every single time I install, I get to:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri'
Right after giving the site a name and such.
I am at my wit's end.
Any guidance would be so appreciated.
I hope it's ok to make this active again.
Comment #4
duckydan commentedJust to clarify, my issues is installing, not posting images, but the error is very similar. "Duplicate entry '' for key 'uri'"
Comment #5
mcrittenden commentedI have the same exact error as #3 on install.
@duckydan, what version of PHP are you running? I'm on 5.4.15 which might be related.
Comment #6
joshua.boltz commentedI've tried installing OpenAtrium Alpha 5 on PHP 3, 4, 5 on my local Mac using XAMPP, Acquia Dev Desktop, and MAMP.
I also get the same error as #3.
FYI - When installed on Acquia Dev Desktop, I also got an error about a missing IMAP extension, so I copied the imap.so from the XAMPP modules folder over to the extensions folder on Dev Desktop and edited the php.ini file to check for the imap.so, and then it installed, up until the below error ended my excitement.
Needless to say, I'm anxious for the next release, hoping it's more stable and can be installed on a local server. I have not yet tried a live domain, but I'm assuming that would work.
Let me know what you've done to make it work for your use.
Comment #7
mcrittenden commentedSome more information, I get the same error on alpha 4 (I get other errors on alpha 3 and didn't go back any further than that).
I tested on a different box that's PHP 5.2 instead of my normal 5.4 and I get a slightly different error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key '2'
I would call this critical since it's preventing installation.
P.S. Hey joshuaboltz! Small world!
Comment #8
mcrittenden commentedAfter some investigating, looks like it wants there to be a sites/default/filesprivate directory and it fails if that doesn't exist. So here's a workaround:
1. Create sites/default/filesprivate and make it writeable (might as well chmod 777 temporarily just to be sure)
2. If you've already gotten the error above then that means the system inserted a single bad record into file_managed so you'll need to open up MySQL and run "delete from file_managed"
3. Refresh the installer. It should work this time.
Comment #9
mcrittenden commentedComment #10
joshua.boltz commented@mcrittenden, small world indeed! Thanks for all your help in the past. Hope all is well.
I'm looking forward to seeing what OpenAtrium can do (once it can be installed)!
Comment #11
mpotter commentedFixed in 6fc6e1b. There was a missing / in oa_config.install when adding 'private' to the file path.
The IMAP issue is already in #1999962: Mailhandler PHP IMAP requires that PHP's IMAP extension is enabled in order to function properly.
Comment #12.0
(not verified) commentedAdded update history.