Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hello
after installing the image module, i can add images to the previously defined gallery. but after few hours i cannot - the Image Galleries select html object is missing in the post image page (node/add/image). it happend to me in two installations of drupal. i have got the proper rights, so i dont know, whats the problem. any ideas? or it is a bug?
mirek
Comment | File | Size | Author |
---|---|---|---|
#5 | image_vocab.patch | 1 KB | neclimdul |
Comments
Comment #1
Bèr Kessels CreditAttribution: Bèr Kessels commentedDid you create the gallery containers?
Comment #2
kieran-1 CreditAttribution: kieran-1 commentedI am having the same problem at the moment, has there been any further work on this problem? Have you solved it? If so how?
Help would be appreciated, thank you.
Comment #3
trauma CreditAttribution: trauma commentedI have the same problem - poking around in the source didn't get me very far, but I get the impression the image_view hook doesn't get called (still investigating). I'm on current CVS for both drupal core and image module, but I made some CVS updates in between (yes, with DB updates).
Images added show up in the random image block, but not in any gallery.
Comment #4
trauma CreditAttribution: trauma commentedOK, forget what I said about the image_view hook.
(obsolete) In current CVS in the image_form hook, where does the taxnonomy selection happen? Is it enough to have a vocabulary for the image type to trigger a selection form element? I ask because if I manually (via db admin) assign an image node to a term (= gallery) everything starts working. So something is missing here.(/obsolete)
Update: found it. vocabulary_node_type has an type of "0" for the image vocabulary (which was auto created here) but should have "image" in the db.
Comment #5
neclimdulAlmost made a new issue for this. Glad I did a search.
the node field in the vocabulary is array('image'). This causes some very strange behavior in other modules as it creates a vocabulary of type 0 which validates in weird ways. Furthermore it makes it impossible to add images to modules.
So... Here's the patch against the latest CVS.
PS. My version has more patches applied than an old bike tire... Its becoming hard to make patches without other patches.
Comment #6
ashtonium CreditAttribution: ashtonium commentedThe patch above did not fix the issue for me (Drupal 4.7b6). There is still no Gallery select box on creating or editing an image node.
Comment #7
decafdennis CreditAttribution: decafdennis commentedThe patch does work. It only helps though when the Image Galleries vocabulary has not been created yet, so for an existing site you have to set the correct settings manually. You can do this in administer > categories, then click edit vocabulary for Image Galleries and enable it for image nodes.
Comment #8
neclimdulYeah, this patch doesn't fix the damage the bug caused. The vocabulary was being written incorrectly to the database. To fix a previous install you would have to add an update script. I don't have any experience with this and I'm not sure how far back the bug exists but I can try my hand if its deemed necessary.
Comment #9
neclimdulThe update script for 4.7 would probably look like this and would be put in a image.install file in the same directory as your image.module. This query worked on mysql 4.1.18 . As for drupal 4.6, I think this issue affects it too but I don't know how to fix it other than telling you to save your image settings again.
Comment #10
neclimdulThe update script for 4.7 would probably look like this and would be put in a image.install file in the same directory as your image.module. This query worked on mysql 4.1.18 . As for drupal 4.6, I think this issue affects it too but I don't know how to fix it other than telling you to save your image settings again.
Comment #11
neclimdulIn review it should be
PS. Sorry for the double post. Twitched.
Comment #12
ashtonium CreditAttribution: ashtonium commented+1's all around
After running neclimdul's SQL on my database and changing the category settings as per naquah's instructions I was able to apply Image Gallery categories to new and edited images.
I set up a fresh 4.7b6 install, and added the image module, (above patch applied) -- created a gallery, and was able to apply new images to it.
Much thanks to everyone.
Comment #13
decafdennis CreditAttribution: decafdennis commentedEssentially my instructions do exactly the same as the SQL query provided by neclimdul, but then manually. IMO it is unnecessary to provide an update function in image.install for this.
Comment #14
walkah CreditAttribution: walkah commentedcommitted to HEAD.
after mulling it over, i've decided not to include an .install - as yes this is easily fixed manually (as per naquah's instructions) and since it didn't exist in an "official" release, I'm going to trust that everyone using a HEAD version can handle it. ;)
thanks for your work guys!
Comment #15
(not verified) CreditAttribution: commented