views:

46

answers:

2

Imagefield is not working properly and I get this lengthy error -

{ "status": true, "data": "\x3cdiv id=\"edit-field-image-0-ahah-wrapper\"\x3e\x3cdiv class=\"form-item\" id=\"edit-field-image-0-upload-wrapper\"\x3e\n \x3cdiv class=\"filefield-element clear-block\"\x3e\x3cdiv class=\"widget-preview\"\x3e\x3cdiv class=\"imagefield-preview\"\x3e\x3cimg  .............

whenever I upload image. After a bit of detective work, I found out that my own module, which is written for creating custom content type, is causing imagefield to fail. Does anyone know what usually trigger this type of error? Your help is much appreciated.

Imagefield - 6.x-3.7   
CCK - 6.x-2.8   
Filefield - 6.x-3.7   
drupal 6.x
+1  A: 

Its tough to say unfortunately. I suspect its something to do with AJAX. Try debugging the Javascript using Firebug in Firefox.

Sid NoParrots
I'm starting to get headache now. I've commented out the whole module file and tested with built-in content type - story with system theme - garland. This error won't go away. I'm baffle as to why I am still getting this error even there is no executable code in my module. If my module is at fault(seems that way cuz no error when I turn off my module), doesn't it suppose to go away after I commented out all the code in module?
Andrew
You probably want to make sure you have latest version of imagefield, cck etc. Also some modules interfere with others -- maybe you want to start (temporarily) disabling some modules on your system and see if the error goes away. Also make sure that the modules on your system have not had people making changes to the code... inadvertently or deliberately. So many errors can be avoided if the code is just pristine!
Sid NoParrots
A: 

I had similar problems few days ago. I've used Ubercart module, particularly its product module. There is an imagefield in the product creation form. So I got the same message (JSON output) trying to add picture to product. Important note: such a behavior was observed only in Chrome (I'm on dev-channel of it). Firefox handled form successfully. I didn't investigate the reasons of such a behavior unfotunately. But I advise you to check your site in different browser(s) too.

Konstantin

related questions