Will anyone be working on updating Image Publishing for compatibility with Drupal 5.0?

Comments

robloach’s picture

StatusFileSize
new5.9 KB

I've updated the Image Publishing module to Drupal 5.0 RC1, and attached the patch here. Would someone please commit it?

robloach’s picture

Status: Active » Needs review
StatusFileSize
new246 bytes

Make sure you don't forget the attached image_pub.info file.

Tobias Maier’s picture

Status: Needs review » Needs work

small nitpick:
code like this

+      $info .= t('<h3>Gallery Remote</h3>');

should be

+      $info .= '<h3>'. t('Gallery Remote') .'</h3>';
robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new6.4 KB

Good find..... I've included the .info file in this patch.

oliver soell’s picture

works for me

genemcc’s picture

tracking

charly’s picture

seems to work here too

bradsw57’s picture

Installed HEAD tarball on Drupal 5.1 with image 5.x-1.x-dev, gallery 5.x-1.x-dev, clean URLS.

Gallery Remote 1.5 and later cannot connect. (have not tried earlier versions).

Page not found errors with URL "http://www.bradmarg.homeip.net/main.php?g2_controller=remote.GalleryRemo..." present in the Drupal message log.
apache error log contains "script '/var/www/drupal/gallery_remote2.php' not found or unable to stat"

Website is at http://www.bradmarg.homeip.net (it's on a slow link, so please be nice :))

charly’s picture

I can confirm it doesn't work :/
I have the same error in apache logs, but none in drupal logs..

bradsw57’s picture

My bad.

The Gallery module puts some mod_rewrite code into .htaccess, which catches the gallery_remote2.php url before it gets to the module. Removed the rewrite rule and it's all good.

charly’s picture

Seems strange since i don't use the Gallery module.
Can you explain a bit more?

bradsw57’s picture

Followed up via email.

In short, the line

"RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php"

that the gallery module puts into .htaccess needs to be removed for this module to work, I think.

Wimmmmm’s picture

Could someone include the whole install package here please?
I don't want to get into CVS patches just for a 5 or 6 kb file... and HEAD is not updated (looking at http://drupal.org/node/63154/release )

Thanks!
Wim

KMNL’s picture

Could someone post a zip here and we can all test before its released?

Bevan’s picture

Please

robloach’s picture

StatusFileSize
new32.09 KB

You'll also need image_pub.info:

name = Image Publishing
description = Provides a full implementation of the Gallery project's Gallery Remote API in order to support publishing images using Drupal's Image module.
dependencies = image image_gallery
version = 5.x-1.x-dev
package = "Image"

I just tested it with Drupal 5.1 and it seems to be working.

Bevan’s picture

tks

jody lynn’s picture

I'm really glad to see the Drupal 5 version is coming out! This is a very cool module. Thanks everyone who has worked on it!

zach harkey’s picture

Working fine here on 4 production sites.

bwynants’s picture

StatusFileSize
new5.55 KB
  $node->comment = 0;

should become

  $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);

to give comments the proper default value

  // let the image module generate the preview/thumbnail
  _image_build_derivatives($node, true);

  // save the node
  node_save($node);

should become

  if ($node = node_submit($node)) {
	  // let the image module generate the preview/thumbnail
	  _image_build_derivatives($node, true);
	
	  // save the node
	  node_save($node);
  }

node_submit is important for some module depending on hook_submit (organic groups)

    _image_pub_gr_finish(GR_STAT_CREATE_ALBUM_FAILED, $body, t('No such parent album: %parent', array('%parent' => $parentname)));

should become

    _image_pub_gr_finish(GR_STAT_CREATE_ALBUM_FAILED, $body, t('No such parent album: %parent', array('%parent' => $parentaname)));

typo

see also http://drupal.org/node/70841

newe patch added

dsnydernc’s picture

This thread is a mess! So many patches, and patches to patch broken patches, and no explanation as to what should originally be patched (4.7 release or head). Can someone please either update the head ver. with the appropriate patches, or provide a link to download the functioning 5.x module? Too confusing...

bwynants’s picture

version specified on top of this Issue is head so patches should be applied on a clean head version....

grendzy’s picture

I just tested the patchfile_4.patch above (applied to HEAD). It works great! Thank you so much. I'm exporting from iPhoto with iPhotoToGallery. This totally made my day.

edwardrapley’s picture

StatusFileSize
new32.02 KB

I really like the functionality of gallery remote, and I've got a lot of images to upload for a site I'm making so i have sent a bit of time figuring out how to get this module working.

OK, so i know absolutely nothing about programming.

I've given myself a nose bleed and a migraine from trying to work out what needs doing and how to do it and then spent 4 hours trying to find out how the numbering of the lines is organized. When all i needed to add was a " ; " in the right place.

I have manually applied patchfile_4.patch to the HEAD version and then added the .info file to the folder and uploaded it all.

So now it the module is enabled, it appears in all the right places in the admin, and since i put the " ; " in it isn't generating fatal errors, but it isn't working.

I'm using Gallery Remote 1.5 ( http://gallery.menalto.com/wiki/Gallery_Remote ) and all i get when i put in the URL for the Drupal root is a message saying: Gallery Remote can find no protocol implementation at http://www.edwardrapley.co.uk. Check with a web browser that http://www.edwardrapley.co.uk is a valid gallery URL.

anyone know what the problem might be?

I've attached the patched module file, maybe the problem is in there?

grendzy’s picture

spent 4 hours trying to find out how the numbering of the lines is organized.

The patch files are meant to be machine-readable. Were you trying to edit the module file manually? Sorry if this is a stupid question, I'm just wondering why you were trying to figure out the numbers in the patch file.

Normally, a patch is applied like this (from a unix-like shell):
# patch image_pub.module < patchfile_4.patch

Hopefully there will be a 5.x release soon, but in the meantime try the "patch" program.

edwardrapley’s picture

StatusFileSize
new32.16 KB

I've patched in the couple of lines about deleting the temp files and I have reworded the syntax of a couple of lines as suggested by Tobias Maier.

Now when I enter URL for Drupal root i get: this error message: Error: HTTP POST failed (HTTP 404 Not Found)

DEVELOPMENT! Following a post i found which i can't locate now, i removed the whole section generated by my previous gallery2 installation in the .htaccess file and now Gallery Remote works!

All the features seem to be working, photos uploading very nicely. Now i just wonder if the meta tags or taxonomy can be set from Gallery Remote?

edwardrapley’s picture

I have now installed the image_pub to 3 sites. It works perfectly on the first one.

But with the other two sites it accesses the galleries fine, however it sees them as read only so i can't create new galleries or upload photos with Gallery Remote.

The sites are running on the same versions of image (5.x-1.0) and image_pub (5.x-1.x-dev).

I've noticed this problem come up a few times in previous treads about this module but i haven't seen anyone suggest reasons for it happening or how to solve it. Any suggestions?

bwynants’s picture

StatusFileSize
new15.39 KB

uncomment the part after

/**
 * We try to set the correct cookie domain. If you are experiencing problems
 * try commenting out the code below or specifying the cookie domain by hand.
 */

in your settings.php file.

it's a problem with the session ID

attached (rename to zip) the last version I have will all known patches. Can somebody commit this?

Stuart Greenfield’s picture

I'm still getting to grips with PHP Eclipse and it's making weird patches, but I've changed line 246 from

$node->status = 1;

to

$node_options = variable_get('node_options_image', array('status', 'promote'));
  foreach (array('status', 'promote', 'sticky', 'revision') as $key) {
    $node->$key = in_array($key, $node_options);
  }

so that a new image respects publish status, promotion, stickiness and revision status settings.

This is a great module - I'm using it all the time now to upload images :)

bwynants’s picture

Status: Needs review » Closed (fixed)

The maintainer of the module is on holiday. I can not commit changes in this project. therefor I placed the latest version in an archive on the web

All changes/fixes here have been committed to that archive.

The 5.0 module can be found on http://www.goju-ryu.be/image_pub.zip

asciikewl’s picture

Did this quick change to get image_pub working with image 1.3:

--- image_pub.module    (revision 430)
+++ image_pub.module    (working copy)
@@ -432,9 +432,9 @@
 
 function _image_pub_gr_fetch_albums($refnum, $check_writeable) {
   $body = '';
-  $thumb_dims = _image_get_dimensions('thumbnail');
+  $thumb_dims = _image_get_sizes(IMAGE_THUMBNAIL);
   $thumb_max = min($thumb_dims[0], $thumb_dims[1]);
-  $preview_dims = _image_get_dimensions('preview');
+  $preview_dims = _image_get_sizes(IMAGE_PREVIEW);
   $preview_max = min($preview_dims[0], $preview_dims[1]);
   $nalbums = 0;
   $cperm = 'false';