with 'existing images' disabled, all images show for attachments on new nodes
| Project: | Image |
| Version: | 6.x-1.0-beta3 |
| Component: | image_attach |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Hi,
I have just updated to Drupal 6.14 and also Image module 6.x-1.0-b3.
The first problem I had was with the Image module update reporting:-
'Failed: ALTER TABLE {image_attach} ADD 'weight' INT NOT NULL DEFAULT 0'
I did some searching and found a 'similar' report on an earlier issue which implied that this wasn't a problem and the update would still have been successful, so I didn't worry about the error. However, I have now found an issue that I don't know if it could be related either to that error or due to something else or even the functioning of Image has been changed.
What I'm experiencing now is:- when a user creates content where attaching images is allowed there is a scroll box of Attached Images where a user sees and can select from images previously uploaded by other users. I suppose this could be a valid feature, but I have got Attach Existing Images disabled. Is this a bug or have I missed another place to turn existing images off?
Second problem (I don't know if it's related so I wont open another issue):- before the updates I had it set to only allow 1 image to be attached to content. Since the update a user can upload/attach multiple images to a node. This might be me, but I have looked an looked but I can't find the option to limit the number of images anymore.
Thanks for any help/info.
PS: As mentioned, I don't know if these are related. Please split the message if I'm wrong.

#1
1. The weight thing can be ignored, IRRC. Check you actually have a weight column on your table!
2. Sounds like a bug, but I've just given it a spin on my test site and it all works as expected. You should see in that box the list of currently attached images only, so you can unselect some.
3. There's currently no limit on the number of images. You could file a separate feature request for that, but TBH neither of the current maintainers has much time, so it'll have to be a community effort -- if people write and test a patch it'll go in.
#2
Hi joachim,
Thanks for the reply.
1.Understood, no problem.
2.I can imagine this scroll box with existing images being present if I hadn't disabled the Attach Existing Images option, but I have disabled that option. Not sure if I was clear in my original message, but this scroll box with the list of images is visible on the entry screen for a new (fresh) content for any user. I'm not talking about a user unselecting an image from an existing node. Sorry my english is not 100%, am I making it clearer?. The main point I guess is that Attach Existing Images is disabled and users are still seeing the list and able to select those.
3. This 'might' be me. Before I upgraded the Image module I deliberately skipped a version because of problem that version had, so the last version I was using seemed to only allow 1 image to be attached... was this correct?. I was happy with that as I was using Image attach so that role permissions allowed some users to attach a single image and then using Node Images to allow another group of users to attach multiple images. Is multiple images a new feature over the last couple of versions and if so is the any way to limit the number of images that can be attached?. Seems (to me) like quite an important option really or there is no backward compatibility with previous versions and also a user could upload/attach 100's of images.
#3
Just change the title a little.
#4
Right, just tested, and yes, that's a bug.
For 3, please file a feature request. I honestly hadn't considered that as a use case, given the clamour to allow more than 1 image. You could fix this in a quick and hacky way with a validation handler in a hook_form_alter...
#5
Thanks joachim,
For 3:- My thoughts are... yes there always seemed to be a desire to have multiple images and I can see that as a valid and good feature. The problem arises, as you realise, when an existing installation is configured to use just one image and there is no way with this version to have this backward compatibility.
I'm not sure I know how to open a feature request or that my descriptions are good enough!... I'll give it a try.
I'm definitely no good at doing hacky things or patches (I've tried in the past and failed miserably). Can you tell me if there is a safe way to go back to a previous version of the Image module and if so which version would function in this way and where/how can I get it?
#6
Same problem here after updating to beta3, all images shown in the box. Could you describe more precisely how to fix it?
#7
The module has a big and complex form_alter which inserts the attaching form.
You'd need to wrap the bit that adds the existing image selection box in an if block, basically.
If you're able to provide a patch, please do :)
#8
Please could you test this patch.
#9
Hi,
I am also using Drupal 6.14 and also Image module 6.x-1.0-b3
After applying the patch, the problem stays unchanged as you can see on the attached image.
All the images previously uploaded by other users are visible to those who also want to attach an image while they create a node
Thanks
#10
Very strange. Works perfectly for me. Sure you applied the patch properly?