I'm not sure if this is the right place to report this problem, I don't know if it's a bug with gallery.module or with Gallery2....here's what I'm experiencing:

If I click on the link to print a photo on Shutterfly (or Photoaccess) while within Drupal, I'm taken to the Shutterfly website, but the thumbnail image does not display. If I do the same thing directly from Gallery2, the thumbnail appears correctly. Taking a closer look, the link that's being generated appears to be broken: When using drupal+gallery2 the thumbnail link is

http://www.shutterfly.com/c4p/gallery2/main.php?g2_view=core:DownloadIte...

but when using Gallery2 directly, the link to the thumbnail is:

http://www.mysite.com/gallery2/main.php?g2_view=core:DownloadItem&g2_ite...

It seems drupal+gallery2 is thinking the thumbnail is on the shutterfly website when it really should be coming from "mysite.com."

I'm not really sure where to start looking to fix this bug...

Comments

muergano’s picture

I get exactly the same problem. I found really hard to believe we are the only two experiencing the same issue, which is a big shame because one of the main reasons I post my photos online is so my family can order pictures directly from my site and it is not working.
I have been trying to find the root cause of this problem with my limited html-php skills but so far have not been able to. =(

dschuetz’s picture

I have the problem, too. What I'm seeing is that the URL for the photo thumbnail (and, presumably, for the photo itself) doesn't include a hostname. Because we see the broken thumbnail on the shutterfly site, it appears to be within the same page structure as the shutterfly page.

This has happened with the current gallery.module (not the CVS version), with G2 versions Beta3 and CVS Beta 4.

muergano’s picture

I think it is important to mention two things:

- We don't get the error while printing from a "standalone" Gallery2. It only happens when the (same) gallery is embedded in Drupal.
- We also get the error when trying to order from Photoaccess.

These two issues would make me point towards the Drupal-Gallery2 integration.

dschuetz’s picture

I've got the Shutterfly printing bit to work, I think. I haven't put this through really extensive paces, so I'd appreciate it if folks could give it a shot and see if it doesn't break anything else.

In the Drupal gallery.module, under function _gallery_init(), I added 'embedPath' => '/' to the $parms list.

That is, the array starts like this:

  $params = array('embedUri' => $embedUri,
                  'embedPath' => '/',  // djs
                  'relativeG2Path' => $relativeG2Path,

Like I said, it seems to work, at least so far. Can anyone please confirm?

Thanks!

[ps - I'm using CVS versions of the module and CVS of G2, as of Beta 4]

fester’s picture

Sorry it's taken a while to reply, I haven't been checking on the status of this too much. I've tried your suggested fix, Dave, but unfortunately it broke all my thumbnails.

dschuetz’s picture

I've tried your suggested fix, Dave, but unfortunately it broke all my thumbnails.

Okay, there's got to be some inconsistencies in how people are installing this module. Because, in general, it's worked fine for me from the start, but for others, they simply can't make it work at all.

here's how mine is configured:

  • Gallery is installed in /var/www/gallery2
  • This installation is available directly through a local domain at /gallery2
  • It's also available directly through my main domain at the same path
  • Drupal is installed in /var/www/drupal, and I have two sites definied in /drupal/sites
  • Gallery is enabled only for one of those two sites
  • The location option for the gallery module is "gallery2/"
  • None of my image blocks are on
  • My gallery_init sets: embed_path = /, and I think the rest are as distributed in the module

I'm not sure whether there are other options within gallery itself that are pertinent here. I really think a lot of the problems people are having come down in some way to paths, installation folders, etc., etc. Unfortunately, there isn't a lot of documentation for this module. I hope to document some of the hacks I've done to it (fully integrating album menus into the site menu, etc.), but just haven't had the time yet...

Hopefully, you'll find something different about how yours is installed that makes the difference. Other than that, I can't think of anything, at least not at this time of the morning. :)

kiz_0987’s picture

Status: Active » Fixed

Now functional.

kiz_0987’s picture

Status: Fixed » Closed (fixed)