RE: http://drupal.org/node/297035
Same problem here but with a couple twists:
Server and config: Drupal 6.10/php 5.1/RHE5; php memory set to 512M w/ only core modules installed + imagefield, cck, and filefield, using Garland as a test theme.
Upload and image works fine in Firefox: selects file, uploads, previews, saves. Works great.
In Safari (3.2.1) I get the dreaded code dump, the file is uploaded to the server, but no preview, no file saved to the db.
partial dump:
\x3e\n\x3c/div\x3e\x3c/div\x3e\n\x3c/div\x3e\n\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings.ahah, { \"edit-field-image-0-filefield-upload\": { \"url\": \"/filefield/ahah/test/field_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-0-ahah-wrapper\", \"selector\": \"#edit-field-image-0-filefield-upload\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"op\": \"Upload\" } }, \"edit-field-image-0-filefield-remove\": { \"url\": \"/filefield/ahah/test/field_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-0-ahah-wrapper\", \"selector\": \"#edit-field-image-0-filefield-remove\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_image_0_filefield_remove\": \"Remove\" } }, \"edit-field-image-1-filefield-upload\": { \"url\": \"/filefield/ahah/test/field_image/1\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-1-ahah-wrapper\", \"selector\": \"#edit-field-image-1-filefield-upload\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"op\": \"Upload\" } }, \"edit-field-image-1-filefield-remove\": { \"url\": \"/filefield/ahah/test/field_image/1\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-1-ahah-wrapper\", \"selector\": \"#edit-field-image-1-filefield-remove\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_image_1_filefield_remove\": \"Remove\" } } });\x3c/script\x3e" }
In Opera (9.6.3) I get the same behavior as in Safari.
Nothing changes when I turn off Devel.
On a CentOS server, I can get further w/Safari, but noticed differences in behavior:
Imagefield defined as multiple images. When I go to upload field, get code. However, if I click on the "Add another" button, the image preview magically appears.
I went back and tried to replicate on the RHE server, but when I upload and get the code dump, no preview appears.
No problems at all in Firefox.
Installed the 3.0-alpha2 release, got new error messages, but now the image uploads just fine.
Comments
Comment #1
quicksketchCould you clarify the version you're running? Why would you install the 3.0-alpha2 version? Are you using private or public files?
Comment #2
quicksketchBtw, this is very similar to #375914: Safari 5, Chrome and Opera intermittently fails to upload. If it sounds like the same issue, let's consolidate there so I'm not answering the same question in two places.
Comment #3
trailerparkopera commentedThanks for the response. I don't think this is the same issue as #375914, but they may be related. I don't get the spinning pizza of death (SPOD). The transactions appear to complete, but the returned values are all wrong.,
Further, things seemed to work with the alpha2 version (with the exception of all the other errors that were thrown, but didn't appear to affect the function).
I started out with 3.0-rc1, then went back to alpha2 (after seeing another post in the closed issue on this subject where someone said it worked for him), then decided to try the dev version to see if anything had changed. Just flailing around basically.
When I get back to the office later, I'll try alpha3 to see if that produces the same result.
Comment #4
quicksketchAs I've said before to a few others. Using the RC1 version, then downgrading to an alpha version, then upgrading to the RC1 version again later will permanently damage your database. By upgrading then downgrading, FileField thinks that certain update have run (since the installed schema version is kept in the database). When you upgrade to the final version of FileField, the updates won't be run again and you'll be left with a screwed up database that will inevitably cause errors. I'd suggest uninstalling FileField (admin/build/modules/uninstall) and starting over again or restoring a database backup from before installing FileField. Downgrading modules without restoring a backup is bad news.
In any case regarding the problem. Just like I've said in the other issue, I'm having trouble reproducing this problem. If you can provide a set of steps to reproduce this problem from a fresh installation of Drupal I'll have another look.
Comment #5
trailerparkopera commentedI should have made this clearer: each test was done with a fresh install of Drupal with only the required modules -- plus image, filefield, content, imagefield and any dependencies -- installed.
We've been trying to narrow down the causes of this so we setup a test install on one of our servers to try to isolate the problems.
Here's a more explicit description of how we're testing with Safari or Opera and using RC1:
1) Install a fresh Drupal db.
2) Login as first user
2) Install content, content-text, image, filefield, content, imagefield modules.
3) Create a new content type (test) with:
a) text field, unlimited values
b) image field, single value
4) Add a new test node. Enter title.
5) Add test copy to text field, enter. Result: text appears.
6) Add test.jpg via imagefield upload. Result: code dump in area where preview should appear. No files uploaded to test server. No preview appears. File upload widgets disappear.
What else can I be looking for to try to provide more clues?
Comment #6
trailerparkopera commentedTo follow up on #5: I reinstalled a clean version on a new, vanilla install of Red Hat Enterprise 5 w/php 5.1
Still get the dumped code in Safari, but the image actually uploads and attaches. An edit page refresh then brings up a preview of the thumbnail and upload button widgets.
Comment #7
quicksketchThe cause of all Safari woes: http://drupal.org/node/375914#comment-1485768. Please follow up in that issue. I'd like to keep all the Safari problems in one place.