OK, I have tried this on two different installs of 4.7.2 with cck cvs and i am getting the same bug. I can add an imagenode no problem. I can attach an image to a custom node also no problem. When I edit an already existing node with an image, the image dissapears. On one install i get no error, just the disappearing image. I can go back and re-attach an image and it will work fine, but as soon as I try to edit the node again the image disappears again. On the other install i get this error message:
array_merge() [function.array-merge]: Argument #2 is not an array in c:\Inetpub\wwwroot\drupal\modules\cck\imagefield.module on line 172.
the two installs are running on different servers. the one throwing the error is a windows machine, the one not throwing an error is a nix machine running apache. any help would be appreciated.
thanx,
thom
Comments
Comment #1
dopry commentedWhich exact version of image field/cck are you using?
Are there any errors in watchdog?
Comment #2
onepairofpants commenteddopry,
CCK:
content.module,v 1.64 2006/06/12 19:36:54 JonBob Exp
Imagefield:
imagefield.module,v 1.2 2006/07/07 21:04:18 dopry Exp
Thanks for all your work on this. It is exactly what I need and is working great except for this little glitch.
Let me know if you need any more info.
Thanks again,
Thom
Comment #3
dopry commentedIf you upgraded the modules, either imagefield or cck, you may need to remove then re-add the field to the content type. The way cck handles tables/columns for fields changed with 1.63 & 1.64. I'm unable to reproduce locally.
Comment #4
onepairofpants commenteddopry,
I tried that. Also tried a new content type with only imagefield and textfield. Same problem. I tried updating the database (???) still the same problem. I did update both modules though. perhaps i missed something? any other thoughts? I am pretty much lost at this point.
Thanks,
Thom
Comment #5
dopry commenteddid you run update.php?
Comment #6
onepairofpants commentedyes.
Comment #7
stanbroughl commentedI have the same versions installed and am also getting this error of images disapearing on editing my page.
Comment #8
marcoBauli commentedYes, same on me on CCK 1.64 and Imagemodule 1.33
Once i edit my content types the image disappears. If i then go to edit page again, it is no more listed in the "attach" field, which is blank..
Note: this happens also just previewing the node, where the red warning "If a new image is chosen, the current image will be replaced upon submitting the form." appears.
Is like if when editing, a new "blank" image is attached.
Comment #9
onepairofpants commentedI am getting the same errors as you guys. At least I am not alone. I though perhpas there was something wrong with my install. I was going to try a fresh install and see if i could recreate the problem. has anyone tried this yet?
-thom
Comment #10
dopry commentedI've got a site that I can reproduce the error on... I will have time to work on it on friday. Its an issue with the per-field session identifier or one of the session clearing functions most likely.
Comment #11
stanbroughl commenteda fresh install makes no difference, it doesn't seem to hold onto the image details properly on editing a page - the image stays in the files/images folder though so it's not deleting it from there
Comment #12
da312 commentedI have this same problem, if you edit a page with a photo and leave the photo field blank it will delete the photo...
Comment #13
onepairofpants commenteddopry,
thanks for looking into this. is there anything i can do to help? i am a designer not a developer but i am willing to do testing or whatever i can....
thanks again,
thom
Comment #14
dopry commentedThis should be fixed in cvs version 1.3.
Comment #15
da312 commentedDoes it fix the problem for anyone? It didn't seem to change for me. I downloaded CVS verson 1.3, uploaded it, and ran update.php.
The only thing that seems to have changed is that it says, "This image will be removed from Drupal and Replaced on submit."
I uploaded an image, it worked. I edited the page again, but left the field blank and the image was deleted.
Am I doing something wrong?
Comment #16
dopry commentedyou're using the cvs head version of cck, and version 1.3 of imagefield module from contributions/modules, not my sandbox yes?
Comment #17
dopry commentedok now try with 1.6... I put a > 1 in the wrong place. waiting on webchick to confirm.
Comment #18
webchickConfirmed; seems to be working great now, thanks! :)
Comment #19
da312 commented1.6 fixed it up for me too! thanks
Comment #20
marcoBauli commentedyay! works!
Comment #21
stanbroughl commentedExcellent! You are a star!
Comment #22
netskaven commentedThe problem is back. I'm using imagefield latest imagefield (19-07-2006) and cck (19-07-2006)
Comment #23
tones commentedI'm having a similar problem with a fresh install of CVS HEAD:
content.module,v 1.49 2006/04/18 and imagefield.module,v 1.8 2006/07/18
Clicking 'attach' reloads the page and displays the "filename:foo.gif" message, but the image is broken (empty black borders in Firefox, the broken window-pane image in MSIE). When I click 'submit' and then 'edit', no image is attached. If I look in the filesystem directly, I can see the image file (foo.gif) present in my '/files/' directory.
Comment #24
marcoBauli commented@Tones: be sure to modify the .htaccess file in the /files directory, as explained in the readme (or install, can't remember..) file!
same happened to me and that fixed the problem
Comment #25
netskaven commentedall working now, thanks for the tip
Comment #26
(not verified) commented