In internet explorer, upon attaching files when editing a node, a new window will launch, then nothing happens. In Firefox and Opera, ajax upload works without problem, where no new windows launches or reloading the page itself.

Comments

decafdennis’s picture

I have the same problem. Temporary workaround is to use the old way of uploading, by using the Preview or Submit button instead of the Attach or Upload button.

decafdennis’s picture

Project: upload (simple) » Drupal core
Version: master » x.y.z
Component: Code » upload.module

Should be Drupal:upload.module, not upload (simple).

decafdennis’s picture

The cause of this problem is that Internet Explodrer does not like to post to iframes that are dynamically created. When I add this line in upload_form() in upload.module:

<?php $output .= '[iframe name="redirect-target" id="redirect-target" style="position: absolute; visibility: hidden;"][/iframe]'; ?> replace [ and ] with < and >, sorry, otherwise Drupal thinks this is suspicious code, tell me how else I should do this?

...it works just fine. An iframe is not valid xhtml however, so this is only a temporary fix and another solution should be nice. I can't find one, unfortunately.

Steven’s picture

Status: Active » Fixed

The problem is not that the iframe is dynamically added, but that we set is name/id through DOM attributes. Apparently IE does not pick these up. But other browsers require the current behaviour. So, we should do both.

Fixed in CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)