Closed (fixed)
Project:
Image Publishing
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Jun 2008 at 07:09 UTC
Updated:
17 Dec 2008 at 00:21 UTC
Jump to comment: Most recent file
This is a port of the HEAD Version to Drupal 6 using the Coder module.
Works fine on a local testsite with the latest release of the Image module.
Changes are:
- Menu system
- watchdog calls
- url() and l() calls
- hook_help()
- info file
CVS diff treated the file image_pub.info as a new file, so I used cvs diff -N for adding the file as new.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | image_pub-270085-17.patch | 9.74 KB | egfrith |
| #10 | image_pub-270085-10.patch | 9.06 KB | egfrith |
| #4 | image_pub.patch | 11.26 KB | singularo |
| image_pub-6.0.patch | 6.44 KB | wwmv |
Comments
Comment #1
Steve Dondley commentedSweet! Testing this today.
Comment #2
Steve Dondley commentedWorks well. Though still suffers from the bug that the images don't get uploaded to a newly create image album added with the image uploading software. I will apply a patch from d5 and see if I can't get it fixed.
Comment #3
Steve Dondley commentedOK, applying the patch from http://drupal.org/node/67421 did the trick. Module worked perfectly for me on a test upload.
Comment #4
singularoUpdated the patch to work with 6.x, there were a couple of things missing, incorporated the gallery not associated patch as well. The only thing is that there were a bunch of t() calls within watchdog calls removed by one of the patches.
Comment #5
egfrith commentedI've just taken over maintaining this module. It's going to take me a while to get into the swing of things (and I don't have unlimited time by any means), but I do hope to deal with this patch soonish.
My basic plan with the module is to fix the show-stopping bugs in the drupal 5 version of the module, release version 5.x.1.0 and then create a drupal 6 branch. At that point I'll look at this patch.
Comment #6
bwynants commentedthere is no image_pub module anymore on head....
Comment #7
egfrith commentedYes, I've just looked into this. It appears most of the files in HEAD (apart from the README) have been cvs deleted (last year) and are now dead in the Attic. I will try to retrieve them (hopefully soon) and put them back in HEAD, though I may need some help from the drupal CVS admins.
After that, I propose that HEAD is the site of drupal 6 development until we have the first non-dev version.
Comment #8
bwynants commentedI'm busy porting my site(s) to 6.0 almost all modules are done, this image_pub is however a requirement. Can someone give me something that works (singularo comment #4 patched files or egfrith) for now? I also want to test an authentication problem that I have in 5.0.... see http://drupal.org/node/204209
I could start porting from 5 tree myself but that seems overkill
Comment #9
egfrith commentedI've now brought back the dead files from the attic and merged the DRUPAL-5 branch into HEAD. Please let me know if you know anything amiss with HEAD.
I haven't had time to try any of the patches yet, though I expect they may not apply since there have been some code changes in the DRUPAL-5 branch since they were created.
Comment #10
egfrith commentedThe second patch earlier on didn't apply, so I've done some work on tidying up the patch. Here is the result. It doesn't work fully yet; you can log in and create an album, but not put any images there yet. However, I'm posting here in the hope that someone might be able to work on this.
The problem seems to be in _image_pub_image_add().
Comment #11
bwynants commentedis there a reason drupal_execute is done?
Why not use image_create_node_from from image?
Comment #12
egfrith commentedI don't think I discovered image_create_node_from() in the earlier versions of image -- perhaps I missed it.
The potential advantage of drupal_execute() is that it returns the errors that you might get submitting the form, for example if the image size exceeds the limits set by image.module. This can then be passed on as helpful error message to the users. From what I can see of image_create_node_from(), it doesn't do that. Other than that, image_create_node_from() would look to be a good way forward.
Thoughts?
Comment #13
egfrith commentedIf we are going to use drupal_execute() there needs to be a
in the form object, though this doesn't seem to fix the problem.
See http://api.drupal.org/api/function/drupal_execute/6
Comment #14
bwynants commentedI got it to work with image_create_node_from
I'm also creating an issue for image to return a proper error code (http://drupal.org/node/337032). I think that's the way to go. If image changes it's form tomorrow your code breaks and this does not.
I do some pre checking so i can return a decent error for now...
http://drupal.org/node/204209 is still a problem however....
Comment #15
egfrith commentedI'm not convinced that image_create_node_from() is the right way to go right now since is it does not do the checking for file size image_node_form() does. I also think it is unlikely that the elements image form will change tomorrow and there is also the possibility that image_create_node_from() might change its functionality too. In order to get sensible error messages with image_create_node_from(), we have to put in quite a bit of extra code that is similar to code in image module, and I rather avoid that in the interests of cleaner code and maintainability.
However, if image_create_node_from() is modified in future to do the checks that happen with the drupal_execute(), I would consider using it in place of the drupal_execute() method.
The attached patch now works with image 6.1.0.alpha3. I had not read the api page for drupal_execute() properly, and had missed out the include line.
We will have to think more about #204209: User authentification does not work under Gallery Remote. I think that after we have this port to 6 at least as good as the current 5.x version, we should tackle #205535: Gallery Remote: Module incompatible with latest GR protocol, as I think it may have some influence on the authentication problems.
Comment #16
egfrith commentedGrrr... I now notice the patch has not been attached. I will have to get it off my home machine this evening... Sorry!
Comment #17
egfrith commentedHere is the promised patch.
Comment #18
bwynants commentedpatch works fine
Comment #19
egfrith commentedThanks for the report bwynants.
Given that there seems to be relatively little interest in this project, I've gone ahead and committed the patch and rolled a release for drupal 6. I don't seem to be able to get the release to appear but not be recommended. Therefore it is "recommended", though ideally I would have some more test results before recommending it.
I'm marking this issue as fixed, though have put up a message on the project page asking for any testing results here.