I have an article type with a single imagefield set up for the module. Uploading and inserting images works fine when the content is created, but if I later try to edit the content without opening up the wysiwyg_imagefield popup, the images will be deleted on save, leaving the body with broken images.

If I click the button to open the popup, then close it without making any changes, the images stay.

CommentFileSizeAuthor
#8 images_cleared-1049120-8.patch452 bytescrantok

Comments

gras-technik’s picture

I can confirm this bug. Is there any clue why this happens?

kpblcc’s picture

in wysiwyg_imagefield.js

  /**
    * Create wysiwyg_imagefield dialog window.
    */
    attach: function(content, settings, instanceId) {
      ......
      Drupal.wysiwygImageField.init();
      Drupal.wysiwygImageField.focus(); // add this
      .....
    },

UI Dialog is not created in the form. function "Drupal.wysiwygImageField.focus()" position dialog in the form.

jmones’s picture

subscribe

jmones’s picture

I confirm that this problem exists and that solution proposed by @kpblcc in #2 works.

ericaordinary’s picture

Also confirming that adding the line suggested in #2 has fixed the problem.

ericaordinary’s picture

On a second look it appears my wysiwyg imagefield disappearing act is not related to editing and saving a node without opening the dialog box. Images are just disappearing on their own after being uploaded for a while, which makes me think it might be related to this problem: http://drupal.org/node/618654

I am running drupal-7.9 so that bug should have been fixed a few releases back. I'm also not having issues with any non-wysiwyg-imagefield images.

ericaordinary’s picture

An update, I can confirm that the fix in #2 does work to stop imagefield from deleting the images when the node is edited.

Turns out my disappearing image problem after applying that fix was related to migrating the site from a dev to live environment, see http://drupal.org/node/1348994

crantok’s picture

Status: Active » Needs review
StatusFileSize
new452 bytes

Solution in #2 works for me too. It looks like nearly a year since a commit was made to this module but I've rolled a patch from #2 against the master branch anyway in case someone can commit it. I'm finding Media module problematic so I still really want to use Wysiwyg ImageField instead.

Carlos Miranda Levy’s picture

Same problem here, still exists.
Will try patch in #2

ericaordinary’s picture

For all those using wysiwyg_imagefield, you should try using wysiwyg_fields module for the same functionality. I've been using it on a couple of D7 sites with success. A few bugs, but it generally works for images once you get your setup correct.

Carlos Miranda Levy’s picture

Erica is right, module "Wysiwyg Fields is the successor to the Wysiwyg ImageField module." as it claims in its Frontpage and its written by the same author as this one Stuart Clark (deciphered).

I've tested it and I am currently using it on a live site without many complications. Works as expected including Colorbox integration.

Get it at http://drupal.org/project/wysiwyg_fields