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.
It's about that time again. We should start the upgrade to 6 now so that we can get it out the door quickly once 6 releases. I'm being pushy because there are a number of modules that depend on Image (like Postcard) ;-) and I am more than willing to help out. I'll try to make some first passes at patches in the next week or two if others don't get to it first.
Comment | File | Size | Author |
---|---|---|---|
#38 | image_im_adv-181809-080114.patch | 1.38 KB | zoo33 |
#37 | image-imagemagick-181809-080114.patch | 997 bytes | zoo33 |
#34 | image_old.zip | 52.45 KB | Donovan |
#34 | image.zip | 49.71 KB | Donovan |
#34 | image-d6upgrade-181809-32.patch | 1.18 KB | Donovan |
Comments
Comment #1
add1sun CreditAttribution: add1sun commentedThis is just starting off with .info and .install file changes. No .module or .inc changes yet.
Comment #2
drewish CreditAttribution: drewish commentedmarked http://drupal.org/node/185766 as a duplicate
Comment #3
add1sun CreditAttribution: add1sun commentedSome more upgrade work. This is mainly just running the Coder upgrade on it and I didn't have time to get all of those. Also note that this patch is converting Image along with all of the underlying contrib modules with it at the same time.
Comment #4
drewish CreditAttribution: drewish commentedfixed a couple of things:
* hook_schema wasn't returning $schema.
* use core's version of image_scale_and_crop().
* added hook_theme to image.module, didn't get around to looking at the contrib sub-modules.
still a ton to do.
Comment #5
misty3 CreditAttribution: misty3 commentedsubscribed
Comment #6
Romka CreditAttribution: Romka commentedFor what version of image.module this patches? I'm download last official release (2007-Oct-17) and its contain, for example, file image.info from 18.10.2007, but all patches search version of image.info from 18 Jul 2007 17:04:02, and patch dont work correclty. Can you upload patched version of module Image?
Comment #7
add1sun CreditAttribution: add1sun commentedPatching for upgrades is done against the HEAD version of the module. If you would like to help with upgrading the code you should grab a copy of HEAD from CVS and work from that. The current patches do not make a fully functional module yet so there isn't really "just testing" to be done until we get the code in better shape.
Comment #8
domasj CreditAttribution: domasj commentedI will try to look at it.
Comment #9
Romka CreditAttribution: Romka commentedI have installed Drupal 6 beta 3, HEAD version of image.module. I'm apply patch image_181809.patch (from #4 post). After this operation image.module was correctly installed, but when i'm try to create new Image-type node (go to node/add/image) i'm get error:
Fatal error: Call to undefined function file_check_upload() in D:\Program Files\Apache Group\Apache2\htdocs\drupal6beta3\modules\image\image.module on line 366
Function file_check_upload() exist in Drupal 5 core, but not exist in Drupal 6. Next, i'm paste this function to the image.module (just copy-paste from http://api.drupal.org/api/function/file_check_upload/5) and "Create Image" form show correctly, but when i'm select image in file-field and press button "submit" i'm get error "You must upload an image", although i'm choose picture in previous step...
Comment #10
add1sun CreditAttribution: add1sun commentedAs I said, the code does not give you a working module yet. It is still broken code and we know this. There is still a lot of basic upgrading that is needed (as you found with the file_check_upload function - that simply won't work in 6.) There is no point trying to actually *use* it yet. The only reason to apply the patch at this point is if you intend to help continue the upgrade by coding and supplying another patch.
Once we get a patch that gets the module basically upgraded and functional, then we will create a branch and ask for testing and feedback.
Comment #11
Hetta CreditAttribution: Hetta commentedmarked http://drupal.org/node/195636 as duplicate
Comment #12
Murzsubscribed
Comment #13
add1sun CreditAttribution: add1sun commentedFew little things worked out. Image node creation still not working though.
Comment #14
rkendall CreditAttribution: rkendall commentedsubscribe
Comment #15
add1sun CreditAttribution: add1sun commentedNew patch attached. This one worked out Image Gallery. The two things in IG that still need a look are
1. I am a little confused about the new non-caching menu stuff.
2. I created the theme registry but did not templatize the theme functions yet. I dare say we should create templates though as this is a common thing for folks to want to easily theme.
Comment #16
add1sun CreditAttribution: add1sun commentedOK, I went through the other contribs as well. Image Attach is mostly done and img_im_advanced and img_import are done.
Comment #17
add1sun CreditAttribution: add1sun commentedI should add that the whole file_save vs file_check stuff is the big stuff that needs to be worked out in Image and Image Attach, while there is still a little bit of minor stuff to do. I totally don't get the file stuff, so I'm leaving that for others to do.
So, Note to folks who are just following along - NO, it still doesn't work. Until the file stuff works, Image won't work.
Comment #18
MurzI can't apply patches to HEAD version of Image module. I try all versions - HEAD from CVS, 5.x-1.x-dev at 2007-Dec-08, 5.x-1.6 at 2007-Oct-18.
I try to apply only last patch, all patches from 1 to 16, patches from 13 to 16, and no one applies successfully.
For example: HEAD version from CVS today, image-d6upgrade-181809-1.patch:
After that applying patch image-d6upgrade-181809-3.patch
Can anybody post already patched version or tell me an algorithm and source for pathcing?
Comment #19
add1sun CreditAttribution: add1sun commentedThe only patch that you should apply at this point is image-d6upgrade-181809-16.patch.
I just did a fresh checkout of image module HEAD
and the -16 patch applied cleanly for me.
patch -p0 < image-d6upgrade-181809-16.patch
Comment #20
drewish CreditAttribution: drewish commentedgot the uploading basically working. it's probably still buggy but at least people can start testing it out.
Comment #21
drewish CreditAttribution: drewish commentedone note: there might be some debug code left in that last patch so if you don't have the devel.module installed you may get fatal errors.
Comment #22
add1sun CreditAttribution: add1sun commentedUploading isn't working for me. Get these nice errors when hitting Save on node/add/image:
The images directory is there and there are two "files" in it (from my two attempts) but both are named upgrade6 (the other is upgrade6_0) which is the name of the drupal root dir. The temp dir within images dir DOES have the proper image thumbnails created.
Patch attached here is the same, just removing the dvms. Unfortunately I don't have time today to dig into the code.
Comment #23
Romka CreditAttribution: Romka commentedUrrrraaa! It works! Big thanks.
Comment #24
Romka CreditAttribution: Romka commentedI'm install Image_gallery module and when i try to create new gallery i'm get error:
Fatal error: Call to undefined function taxonomy_get_vocabulary() in D:\Program Files\Apache Group\Apache2\htdocs\drupal6beta3\modules\image\contrib\image_gallery\image_gallery.module on line 412
This function in Drupal 6 renamed to taxonomy_vocabulary_load(). I'm improve this function name and module begin work correclty.
Comment #25
MurzWith last patches all works good, but image_gallery module gots an error:
Fatal error: Call to undefined function taxonomy_get_vocabulary() in /www/tourismnn.shtrix.ru/www/sites/all/modules/image/contrib/image_gallery/image_gallery.module on line 412
You need to change call to function
taxonomy_get_vocabulary()
totaxonomy_get_vocabularies()
in 412 string of image_gallery.module.Comment #26
MurzI also patched an edit gallery form function for working with Drupal 6, and do a patch from
image-d6upgrade-181809-22.patch
to my version (image-d6upgrade-181809-22_to_editform.patch), maybe it helps to author of module.And full patch from cvs version -
image-d6upgrade-181809-22-1.patch
Comment #27
drewish CreditAttribution: drewish commentedFixed the image_gallery menu.
Fixed the image_attach and image_gallery hook_theme() implementations.
Moved _image_check_settings() into image_requirements().
Comment #28
add1sun CreditAttribution: add1sun commentedooops, drewish you attached the wrong patch.
Comment #29
drewish CreditAttribution: drewish commentedright you are...
Comment #30
add1sun CreditAttribution: add1sun commentedFew minor tweaks for Image Gallery breadcrumbs and new l function params.
I figured out when I am getting the problem with my uploads I mentioned above. It was because I had created my own Image size under admin/settings/image. I had made a new one called Test that was set to scale and crop at 200px. That meant that I could not upload a picture larger than that size and I would get the warnings and junk spit out above. Once I removed that Image size, I could upload things fine.
Comment #31
domasj CreditAttribution: domasj commentedSimple correction of l() parameters in block display.
Comment #32
Donovan CreditAttribution: Donovan commentedHello, this is my first attempt at contributing a Drupal patch.
I patched 'image_attach.module' to address the 'file_check_upload()' and 'db_num_rows()' API changes per the "Converting 5.x modules to 6.x" guidelines. Prior to this patch, the Image module caused the following error whenever I attempted to attach an image to a forum post:
"Fatal error: Call to undefined function: file_check_upload() in /...site_path.../sites/all/modules/image/contrib/image_attach/image_attach.module on line 245"
The changes in this patch have eliminated this error, and my test site now works nearly flawlessly with the Image module and FCKeditor.
The only (un-related) problem I have observed is that the Image Gallery Edit function does not work (i.e, you cannot delete or make changes to Image Galleries after they are created).
Please let me know if this patch does not conform with Drupal standards and I will attempt to comply.
Comment #33
nobios CreditAttribution: nobios commentedHi there!
I'm moving my site, in a test enviroment, drupal from 5.5 to 6-RC1, and image from the offical release. So I grabed HEAD, aplied image-d6upgrade-181809-16.patch and tried to run update.php. I didn't aplied the other ones cause none of then really has nothing new in this area and in #16 we see a light.
I get the following errors:
My files table really don't have nid, just fid and uid. So I went check when and what really changes and find at system.install at system_update_6022.
I'm working on updating this in the install script and change the update_sql(CREATE table to db_create_table.
I only want to know 1 thing first. Do we need to remove this 5200 update so we don't get the errors messages? Or just add the image_update_6000 will do?
Before I forget: Thanks for this great code, I'm a new in drupal development but I will do my best to contribute where I can.
Comment #34
Donovan CreditAttribution: Donovan commentedHi nobios,
This is my first patch submission so I do not know if it was done entirely correctly. Here is the process I used to get the module working as described in my post (#32):
1. Downloaded the current image using:
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d image contributions/modules/image
2. Created the base module by appling the #31 patch using the following command:
patch -p0 < image-d6upgrade-181809-31.patch
3. Changed 'image_attach.module' per my post above to create my working module
4. I then created the patch posted in #32 above from my working module and the base module
I have attached the current working module (image.zip), the base image module (image_old.zip), and the patch for reference. I hope it helps.
Donovan.
Comment #35
recidive CreditAttribution: recidive commentedCorrecting.
Comment #36
drewish CreditAttribution: drewish commentedTo make things easier I'm going to commit all the changes that have been made to this point. There's probably still quite a bit to be done but at least now people will be able to grab a nightly build to test it out.
Comment #37
zoo33 CreditAttribution: zoo33 commentedHere's a small patch to make the ImageMagick toolkit work. There's a new bug in Drupal 6 related to this however, so you also need my patch in #201540 to make it work. Please help review that as well as this one.
Comment #38
zoo33 CreditAttribution: zoo33 commented...and here's another one for the contributed image_im_advanced.module. Seems to work fine now, if combined with the two patches mentioned above.
Comment #39
drewish CreditAttribution: drewish commentedcommitted zoo33's patches to HEAD. i'm going to close this, additional bugs should get their own issues.
Comment #40
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.