Hi,
when i try to upload a image in a node. I have this error display :
{ "status": true, "data": "\x3cdiv id=\"edit-field-banner-image-0-ahah-wrapper\"\x3e\x3cdiv class=\"form-item\" id=\"edit-field-banner-image-0-upload-wrapper\"\x3e\n \x3clabel for=\"edit-field-banner-image-0-upload\"\x3ebanner image : \x3cspan class=\"form-required\" title=\"Ce champ est obligatoire.\"\x3e*\x3c/span\x3e\x3c/label\x3e\n \x3cdiv class=\"filefield-element clear-block\"\x3e\x3cdiv class=\"widget-preview\"\x3e\x3cdiv class=\"imagefield-preview\"\x3e\x3cimg src=\"http://localhost/GBradio/sites/default/files/imagefield_thumbs/footer.pn...\" title=\"footer.png\" alt=\"Image preview\" /\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class=\"widget-edit\"\x3e\x3cinput type=\"hidden\" name=\"field_banner_image[0][fid]\" id=\"edit-field-banner-image-0-fid\" value=\"16\" /\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-banner-image-0-data-title-wrapper\"\x3e\n \x3clabel for=\"edit-field-banner-image-0-data-title\"\x3eTitre : \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"500\" name=\"field_banner_image[0][data][title]\" id=\"edit-field-banner-image-0-data-title\" size=\"60\" value=\"\" class=\"form-text imagefield-text\" /\x3e\n \x3cdiv class=\"description\"\x3eThe title is used as a tool tip when the user hovers the mouse over the image.\x3c/div\x3e\n\x3c/div\x3e\n\x3cinput type=\"hidden\" name=\"field_banner_image[0][list]\" id=\"edit-field-banner-image-0-list\" value=\"1\" /\x3e\n\x3cspan class=\"art-button-wrapper\"\x3e\x3cspan class=\"l\"\x3e\x3c/span\x3e\x3cspan class=\"r\"\x3e\x3c/span\x3e\x3cinput type=\"submit\" name=\"field_banner_image_0_filefield_remove\" id=\"edit-field-banner-image-0-filefield-remove\" value=\"Supprimer\" class=\"form-submit art-button\"/\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\n \x3cdiv class=\"description\"\x3eInsérez l\'image qui sera affichée.\x3c/div\x3e\n\x3c/div\x3e\n\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings.ahah, { \"edit-field-banner-image-0-filefield-upload\": { \"url\": \"/GBradio/filefield/ahah/banner/field_banner_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-banner-image-0-ahah-wrapper\", \"selector\": \"#edit-field-banner-image-0-filefield-upload\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"op\": \"Transfert de fichiers\" } }, \"edit-field-banner-image-0-filefield-remove\": { \"url\": \"/GBradio/filefield/ahah/banner/field_banner_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-banner-image-0-ahah-wrapper\", \"selector\": \"#edit-field-banner-image-0-filefield-remove\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_banner_image_0_filefield_remove\": \"Supprimer\" } } });\x3c/script\x3e" }
This image is uploaded but drupal doesnt know it and i can't complete the node.
When i switch javascript off, the problem is solved. Is it a solution (other than disable javascript) ?
I can't ask people to switch their javascript off to upload something.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | promocode.tar_.gz | 7.4 KB | pagemech |
Comments
Comment #1
quicksketchSimilar to #434394: 'HTTP error 0 occurred' on image upload.
Things to try:
- Turn off Devel module (or more specifically query logging and page timer features)
- Turn off Memcache Admin module
- Turn off any other module that is outputting developer/debug information at the bottom of page.
Comment #2
whistle commentedHi dyesdyes,
did you get the issue resolved?
if so, what did you have to do?
I have confirmed that we don't have any Devel, memcache or other debug modules enabled (as per quicksketch's post) still no luck.
If you mad progress, please share.
Thanks in advance.
Comment #3
quicksketchAnother solution is to try updating jquery.form.js in Drupal core, as suggested in #612754: JS upload broken in Opera 10.1x.
Comment #4
quicksketchComment #5
nvisioncurtis commentedHi,
I'm Stumped. Any words of wisdom?
I too have been getting an error in an alert box while uploading... File is uploaded but drupal doesn't complete the upload transaction and complete action.
"An HTTP error 0 occurred.
/filefield/ahah/page/field_banner/0"
After researching this issue I tried updating using Jquery_update module as specified here http://drupal.org/node/612754
I have also updated CCK, Filefield, and imagefield to their latest versions. Clear cache and same issue.
This actually works on my local xampp server but not on my hosted server.
What else may cause this error?
Could this be a Drupal 6.13 /image-field issue? I have not upgraded yet for selfish reasons. My local copy is Drupal v6.16.
Comment #6
pagemech commentedHi!
Same issue here! I am currently developing a custom module. When my module is being enabled, arbitrary file field uploads end up in printing a JSON String (not only image uploads). The strange thing is that my module is in no way connected to any file fields (at least as far as I understand Drupal module development). The module itself is working as expected...
Would be great if that issue could be solved. My head aches... ;)
I've attached my module. I've been looking over it for hours without finding a clue why file uploads do not work when the module is activated...
Would really appreciate any help!!
Cheers
Comment #7
pagemech commentedUpdate: My module is working correctly now without interfering with file uploads. Still I don't know the exact reason...
The things I've changed:
- As you can see in my module's code (#6) I've split up the module into different files which i've either included either with require_once or by adding the 'file' attribute to the menu item array for some pages. Now I've put the whole module into one .module file which isn't too aesthetic, but works.
- In promocode_persistence.inc I was trying to encapsulate all database related methods into a singleton object. I've removed the singleton object in the working version.
Conclusion: Either something with my module's menu system or the singleton object prevented file uploads from working correctly...
Does someone know why this could be?
Comment #8
quicksketchLet's merge this conversation with #434394: 'HTTP error 0 occurred' on image upload. I really prefer that we keep conversation in one issue. There are just too many situations that lead to the same error.