Download & Extend

HTTP 0 error on second image upload

Project:ImageField Extended
Version:6.x-4.0-alpha2
Component:User interface
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (cannot reproduce)

Issue Summary

When uploading images to an image field with a "caption" field for the images created with this module, the first image uploads fine but the second image causes a HTTP 0 error. My caption field is a multiline formatted text field, using tinyMCE as the input interface, so it might be a conflict with WYSIWYG module or with TinyMCE.

I can upload images fine when the caption is disabled, I can even upload all the images, re-enable the field, then give them captions without any problem. The error only occurs if I try to upload a new item or add an item with a caption input field is displayed. Any tips on what could cause this? I know the HTTP 0 error is a little squirrely from what I've read, but any leads on this would be much appreciated.

Comments

#1

There are a few thousand users so I'm guessing that the key caption could be causing the error. Try renaming if possible and see what happens. Or try using a simple textarea. This may pin-point that there is some error in the AHAH initialization of TinyMCE.

But just in case, a few questions:

Are there any entries in the PHP logs?

Is the error limited to IE? Or FireFox?

And the exact versions of Drupal, TinyMCE / WYSIWYG, and this one (guessing alpha 2).

And if you have FireFox, open the Error console & copy any JScript errors if present. And better still, FireBug for FireFox, copy the request and response fields from the Net tab in FireBug.

Cheers

Alan

#2

I'm using Firefox 3.6.10 on a Mac. In Safari, I don't get the error message, but the upload never seems to complete (the blue spinning wheel never stops).

Changing the key "caption|Caption" to "rubric|Rubric" didn't stop the error. Making it "Multiline text" instead of "Formatted multiline text" DID stop the error. It definitely is TinyMCE related. I'll be trying other WYSIWYG plugins, I'm totally willing to use a different one.

Here's the Javascript error from Firefox:
Error: g.win.document is null
Source File: http://www.example.com/sites/all/libraries/tinymce/jscripts/tiny_mce/tin...
Line: 1

Sorry for not including these versions to begin with:
Drupal 6.10
WYSIWYG module: 6.x-2.1
TinyMCE 3.3.6

#3

Using NicEdit avoids the error. Just need to figure out how to make it the default for captions and leave TinyMCE the default sor other inputs (NicEdit doesn't work perfectly in other contexts).

No dice with these other plugins I tried: CKEditor, jWYSIWYG, Whizzywig

#4

Category:support request» bug report

I haven't had a chance to look into this, but it sounds like the Drupal.settings are not being updated or the context is not being updating properly.

Thanks for the feedback, but fairly busy at the moment, so I can not give an ETA for getting onto debugging this.

Patches welcome :)

#5

Category:bug report» support request

Thanks. I may not be much help with patching this, it gets into some territory that's pretty opaque to me, but I'll at least report whatever workaround I find. That might be helpful...

#6

Category:support request» bug report

oops

#7

Status:active» postponed (maintainer needs more info)

I have just run some tests and I could not replicate this error using TinyMCE 3.x.

My setup is:

Drupal core 6.19

Content 6.x-2.8
FileField 6.x-3.7
ImageField 6.x-3.7
ImageField Extended Fields 6.x-4.0-alpha2

Wysiwyg 6.x-2.1

Insert 6.x-1.0-beta6 (another module that is found in an ImageField instance on the test setup)

I would query what your FileField, ImageField & CCK versions are to start with. If these are not the most recent, then upgrading these would be a good next step.

If you PM me an URL to the site with enough privileges to create a node with images and ensure that PHP display errors are on and the Drupal log & print errors option is on, I could have a look. I really only want to see what the AJAX call is returning, It could be something like:

fatal error: call to undefined function xxxxx()

rather than something like:

{ "status": true, "data": "\x3ctable id=\"field_images_values\" class=\"content-multiple-table sticky-enabled\"\x3e\n \x3cthead\x3e\x3ctr\x3e\x3cth colspan=\"2\"\x3eImages: \x3c/th\x3e\x3cth\x3eOrder\x3c/th\x3e \x3c/tr\x3e\x3c/thead\x3e\n\x3ctbody\x3e\n \x3ctr class=\"draggable odd\"\.....................

which would pin-point the issue instantly.

Cheers

#8

Hi there,
I just ported a Drupal 6.19 installation for a customer from my Solaris/Apache/PHP/MySQL server to a Dreamhost.com Debian/Apache/PHP/MySQL. The configuration is as follows:

Drupal core 6.19 (w/ optional Upload 6.19 enabled)
CKEditor 6.x-1.2
Image Upload 6.x-1.2

When in the page editor and attempting the File Attachment or Image Upload, instead of the preview, I get what looks like POST code:

{ "status": true, "data": "\x3ctable id=\"upload-images\" class=\"sticky-enabled\"\x3e\n \x3cthead\x3e\x3ctr\x3e\x3cth\x3eDelete\x3c/th\x3e\x3cth\x3ePreview\x3c/th\x3e\x3cth\x3eCategory\x3c/th\x3e\x3cth\x3eDescription\x3c/th\x3e\x3cth\x3eWeight\x3c/th\x3e ...

I have not been able to find anything about this problem until I found this post. The file never goes to the /tmp directory but instead gets posted sites/defaults/files directly. If I 'Save' the page with the POST code, I can see the thumbnail image. If I reload the page without saving, the image is still in the files directory, but the thumbnail doesn't show up on the page.

I've tried adjusting the /tmp directory and using Firebug. Firebug keeps reposting something about the meta tag being corrupt.

Has anyone seen this before or know what could be causing it?

Thanks in advance for your help!

#9

I think that you are describing one of those irregular bugs in the AHAH system where the button acts as a submit and redirects to the AJAX response as if it was a normal page. The normal cause for this is that there is some javascript that is not functioning correctly.

Is this related to ImageField Extended? You can use the persist option under Firebugs Console tab to see if there is an error that is triggering this.

#10

Status:postponed (maintainer needs more info)» closed (cannot reproduce)