After an image is uploaded to a node.

When a user edits that node, the image no longer appears in the edit screen.

CommentFileSizeAuthor
#26 patch-imagefield-2.x-rc2-load.patch379 byteskndr

Comments

bobdalob’s picture

Yup.

Just to repeat my elaboration on your initial observation of this:

In node edit, previously published images are not shown. Images will be re-appear in the image field form if you hit the upload button whether you are uploading further images or just leaving the browse box empty. Even if you make no changes the original images will re-appear in node view when re-submitted.

trogie’s picture

Do you mean that this becomes default behaviour?

I'm not sure most users of the module or the users on their sites will understand this...

bobdalob’s picture

trogie, I'm not really sure what you mean by "this becomes default behaviour" - do you mean intended behaviour? If so, no it is not meant to be - this is a bug report for something that, in this instance, did not occur in previous releases. I'd say it's pretty minor - no images are 'lost' - they just do not automatically re-appear when opening the node to edit.

trogie’s picture

ok, no problem then (except for that buggy)

kdebaas’s picture

Further information:
this only happens when editing nodes with created with a 5.x-2.0-rc2 imagefield. When editing nodes that were created before upgrading from 5.x-1.2-rc1 to 5.x-2.0-rc2, the uploaded images appear as they should.

vm’s picture

After further testing last night with dopry in IRC, there is a .js error that may be causing this bug.

can any of you verify in FF or IE, that when you goto /admin/content/types/imagetest/fields/##--one of your imagefields--##
that you are getting an undefined or NULL object error in .js ?

kdebaas’s picture

Output from firebug, using Firefox 2.0 on Ubuntu, when visiting /admin/content/types/artikel/fields/field_beeld01:

button has no properties
redirectFormButton("http://www.test.parallelports.org/imagefield/js", undefined, Object)drupal.js (line 31)
jsUpload("http://www.test.parallelports.org/imagefield/js", "default-value-widget-field-beeld01-attach-button", "default-value-widget-field-beeld01-attach-wrapper", "default-value-widget-field-beeld01-attach-hide")upload.js (line 27)
uploadAutoAttach()upload.js (line 14)
e([input#edit-default-value-widget-field-beeld01-attach-url.upload http://www.test.para...], function(), undefined)jquery.js (line 2)
e(function(), undefined)jquery.js (line 2)
uploadAutoAttach()upload.js (line 7)
e()jquery.js (line 2)
[Break on this error] button.onmouseover = button.onfocus = function() {
vm’s picture

That may likely be the problem. dopry is aware of it as I said. Just wanted confirmation for him that other users can indeed reproduce it.

Also of note, is that this may affect any field in /admin/content/types/artikel/fields/ including ones that do not have an imagefield attached to them. Not that they show an apparent bug, but that they show the .js error

the .js error disappears as soon as imagefield is removed from the equation of modules enabled.

bobdalob’s picture

#6, in IE7:
error: undefined is null or not an object
Line 32, Char 3, Code 0

kdebaas’s picture

Priority: Normal » Critical

as well as the image dissappearing from the edit screen, its alt and title attributes are lost. Forever. I resubmit them, but they don't appear in the content_field_myField table.

bobdalob’s picture

Can confirm #10 yet if further images are added, while editing the node, their attributes are retained (that is, only for the newly added images).

introfini’s picture

Hi,

If we go back to RC1 the symptoms are the same.

introfini

chriszz’s picture

Well - i also lost images while updating!

endrus’s picture

I have also run into the same issue after upgrading to 5.x-2.0-rc2. The bad thing about this bug is that the alt and title attributes, as previously noted, are lost. So when a user, after updating the node with an image, hits save button, he will delete the image attributes. After node update, the image still comes up in the node but with empty title and alt tags. At least, that's the problem I have after the update.

dopry’s picture

Status: Active » Fixed

hmm seems like I busted imagefield_field op == load... It's better now in the DRUPAL-5--2 branch.

introfini’s picture

It's ok now. Thanks!

introfini

vm’s picture

confirmed it's fixed

detot’s picture

Status: Fixed » Active

This happens again when you update to drupal 5.6

vm’s picture

Version: 5.x-2.0-rc2 » 6.x-3.x-dev

confirmed that the .js error has returned in imagefield - HEAD using Drupal 5.6 and drupal 5.x-dev

undefined is null or not an object
Line 32, Char 3, Code 0

Difference this time is, image shows when node is being previewed and edited, but does not show when when viewing teaser or full node view.

vm’s picture

Title: No image when editing a node » Imagefield does not show image in Drupal 5.6

title alteration

dopry’s picture

HEAD is not DRUPAL-5--2 and is not a branch you should be running... It's currently kind of broken... You should stick to the DRUPAL-5--2 branch for now.

dopry’s picture

Status: Active » Closed (fixed)
yched’s picture

Darrel, it seems no 5.x-2.x-dev release is available on the releases page, so people willing to follow latest commits might be tempted to use HEAD :-)

vm’s picture

yched, is correct. This is why I grabbed the HEAD version. there is no 2.x-dev branch available here: http://drupal.org/node/72560/release

Boletus’s picture

It this solved? I run Image Field 5.x-2.0-rc2 and still can't see the images in edit mode. What can I do?

kndr’s picture

Version: 6.x-3.x-dev » 5.x-2.0-rc2
Status: Closed (fixed) » Needs review
StatusFileSize
new379 bytes

Try this patch. It works for me. Only one line is added in function imagefield_field().

jamesfk’s picture

Just tried the patch - and sadly still the same problems:

Images don't show on the edit node form.
Clicking on upload does show them, but deletion doesn't work.
On one content type I have, resubmitting the post having made only text changes deletes the image every time.

kndr’s picture

Hmm. I have installed Drupal 5.7 and imagefield works for me. I don't know if it will be helpful information but try 1) create temporary directory inside 'file' directory and set absolute path to it (like /home/users/me/public_html/files/tmp) 2) install Transliteration module 3) patch imagefield with my patch. I have no more ideas...

musicmadness’s picture

Yeah I'm getting the same as everyone else. I've tried it on a few older versions of 5.6 and 5.2, along with current. The consensus is the same. I can upload the image, and it displays perfectly within the node, but once I hit edit the image I added is nowhere to be seen, instead I'm presented with a fresh new upload button. It pretty much acts like I haven't added an image in edit view, but in display view it displays fine. Not sure what the issue is, as I'm no coder. But I look forward to a fix soon.

Goodluck.

kndr’s picture

What about module Jquery Update? Have you installed this one?

jamesfk’s picture

Hi,

Just to report back, the patch didn't seem to make any difference, but putting on transliteration has fixed the issue for any new uploads now, which is great - though unexpected.

Thanks for the advice :)

vm’s picture

pull the files from the 2.x-dev version is CVS where this has already been fixed.

vm’s picture

Status: Needs review » Fixed

This should be fixed in the RC4 release please test for dopry.

shane birley’s picture

I am still seeing this behaviour in 5.7 and RC4. As a matter of fact, any time the node is edited, all the imagefield images disappear.

shane birley’s picture

Actually, never mind. The behaviour seems to have fixed itself, but not all the time. I will test it further and add comments here or open a new ticket. Fingers crossed! :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.