When attaching files to nodes(file attachment), I get an alert box after pressing the 'Update attachments' button:

An HTTP error 0 occurred.
/file_attach/js

This problem only occurs when the devel module is enabled. Without looking too deeply, I'd assume it's an effect of some extra markup. This is very minor in my opinion, but I wanted to submit the issue anyway.

Comments

Arto’s picture

Issue tags: +Devel
miglius’s picture

The devel module adds various log messages to the json stream generated by the file_attach module to the ajax request, which, of course, breaks the json formatting.

justin.hopkins’s picture

I really just opened this as an fyi, but do you think it's an FYI for the devel module or something to just let go?

miglius’s picture

Status: Active » Closed (won't fix)

Devel module checks the header of the rendered page and if it is does not contain any of the following strings

array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values')

it adds debug information to the page. FileFramework sends it's ajax data with the html header, which is not in the above list and therefore a debug information is added to the data. Adding json output header to the FileFramework's ajax output breaks the javascript in some browsers - ahah.js uses an iframe and the header output by drupal_json() causes problems in some browsers.

lamachine’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha5
Status: Closed (won't fix) » Needs review

Upgrading issue to 6.x-1.0-alpha5.

File management's sub module “Attachments” break the file upload feature. The uploading stop with error: “An HTTP error 0 occurred. /file_attach/js”. The file is uploaded to server but not attached to the node. This is serious issue because it breaks drupal core upload functionality.

Fix:
Deactivating  Devel module  as mentioned in the description.
Another walk around is Deactivating submodule “File management => Attachments” things works fine even if “File management => File” and Devel are activated.

lamachine’s picture

Priority: Minor » Major
lamachine’s picture

Another point:
Enabling "File management => File" and "File management => Attachments" makes disappear files uploaded by "File attachments" upload field.
As soon as I disable "File management => File" and "File management => Attachments" the attached files are shows back on the node.

Ether’s picture

Priority: Major » Critical

Using alpha5 version, not dev.
File upload is impossible due to http 0 error, /file_attach/js error.
Seems to me this is critical bug, as I'm loosing possibility to upload files.

johanneshahn’s picture

Status: Needs review » Closed (fixed)

fixed with

/**
* Menu callback for AHAH additions.
*/
function file_attach_js() {

// Immediately disable devel shutdown functions so that it doesn't botch our
// JSON output.
$GLOBALS['devel_shutdown'] = FALSE;