New PicLens slideshow Issue with embedded Drupal site (5.x)

bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sat, 2008-11-29 22:00

I upgraded to the latest 2.3 release of Gallery today and was eager to try out the new PicLens slideshow feature, and the update seem to go smoothly, however when I clicked on the 'Slideshow' link in an album, I simply got a blank page that said 'Slideshow' at the top. I noticed that the link works perfectly if I browse directly to the Gallery2 site (i.e. non-embedded) so assumed it had to be something to do with being embedded in Drupal.

After spending a couple of hours debugging, I finally figure out that some of the Javascript isn't loading properly in the embedded scenario for some reason (YAHOO and PicLensLite variables were UNDEFINED in Javascript).

I simply added the following 2 lines after the 'foreach' clause at the top of Slideshow.tpl and this seemed to fix my problem:

<script type="text/javascript" src="{g->url href="/drupal/sites/all/modules/gallery2/lib/yui/yahoo-dom-event.js"}"></script>
<script type="text/javascript" src="http://lite.piclens.com/current/piclens.js"></script>

This seems to make things work properly with the embedded site now.

Anyone have any guesses as to what could be wrong? I notice with the non-embedded site, the PicLens app is launched directly from the page you click on the 'View Slideshow' link, rather than taking me to the blank 'Slideshow' page as is (still) happening on the embedded site, this might provide a clue.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-11-30 00:10
 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sun, 2008-11-30 00:38

Thanks, I'll give that a shot. Weird because I searched fairly extensively before posting this message. Not sure HOW I missed your thread. Doh!

 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sun, 2008-11-30 00:37

I'm saddened to report that I get the exact same behavior as I was getting before I made my hack in that the page load, says 'Slideshow' at the top, but nothing happens, and I see the errors (via IE) that report 'YAHOO' is undefined.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-11-30 01:00

Yahoo has nothing at all to do with the slideshow.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sun, 2008-11-30 01:06

Well if you look at Slideshow.tpl in the slideshow module, at the very bottom, you'll see a line like this:

YAHOO.util.Event.addListener(window, 'load', function() {ldelim} start("a{$Slideshow.start}"); {rdelim}, false);

THAT is the line giving the Javascript error about YAHOO being undefined, as in the object YAHOO. My 2 lines I mentioned above cause the javascript to be loaded that defines the two objects that work around the errors I'm seeing. I just don't understand WHY I'm getting those errors (again I suspect it's due to the embedding with Drupal 5.x)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-11-30 01:14

Ok, let me restate, it has nothing to do with piclens.
That template is for the crappy lytebox javascript slideshow, not piclens.
You need to install piclens gallery admin->slideshow

Quote:
Gallery can optionally use a Flash and JavaScript based slideshow from Cooliris to provide users with the best possible viewing experience. Gallery can install Cooliris for you automatically, or you can choose to use an HTML slideshow.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sun, 2008-11-30 02:13

Interestingly enough, I have Cooliris installed, but I went back and uninstalled it (and deleted my template cache) and I get the same behavior with the old slideshow application (YAHOO being undefined). So it seems in my setup, that SlideShow.tpl is getting loaded whether I'm using Cooliris or not, and it's somehow broken.

I suspect I've got something misconfigured or installed improperly for my embedded site, but I'm at a loss to guess what could be the problem.

Thanks for your assistance Suprsidr, I do appreciate it. The Piclens sure is a nice plugin!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-11-30 02:38

When you copied my update, did you uninstall->delete old version->upload new version->re-install?

Also some hosts don't allow direct server to server file copying, so you may want to try installing piclens manually.
http://www.hossainkhan.info/content/manually-install-piclens-cooliris-your-gallery-23-upgrade-or-new-installation

Before I submit my update for review, I'll add forceFullUrl to YAHOO.util in the lytebox template - thanks for the tip ;)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Sun, 2008-11-30 03:14

I think my problem may be related to this: http://gallery.menalto.com/node/82762

Seems to be nothing to do with the slideshow app itself at all, more of a system-wide issue.

Thanks again for your help.

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Wed, 2009-02-11 00:50

Hi

I have the same problem with PicLens failing to load in a Drupal 5.15 embedded gallery 2.3 install. If I use the 2.3 slideshow it loads without problems. But with Cooliris installed nothing loads and I get the following Firebug warning:

PicLensLite is not defined
getAttribute()()utilities.js (line 10)
getRelatedTarget()()utilities.js (line 8)
[Break on this error] var A=D||{};var I=this.__yui_events;if(I...0),parseInt(E[2],10),parseInt(E[3],10)];

In the embedded gallery PicLens launches fine.

I've already applied the hack that bwillette suggests here: http://gallery.menalto.com/node/82762 and although this fixes javascript actions in the admin pane - it has no effect on PicLens.

Anyone have any ideas?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-02-11 01:06

make sure piclens.js and PicLensLite.swf got copied to your g2data/plugins_data/modules/slideshow/
the plugin will try to download a copy from the cooliris site.

suprsidr wrote:
Also some hosts don't allow direct server to server file copying, so you may want to try installing piclens manually.
http://www.hossainkhan.info/content/manually-install-piclens-cooliris-your-gallery-23-upgrade-or-new-installation

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Tue, 2009-02-17 00:41

Actually I mis-typed my previous post, I meant to say:

Quote:
In the un-embedded gallery PicLens launches fine.

Which I assume would indicate that the piclens.js and PicLensLite.swf are present and functioning properly.

 
bexbox

Joined: 2009-03-27
Posts: 4
Posted: Fri, 2009-03-27 16:27

I am having the exact same problem. Has anyone figured out what is happening? The thread just kinda stops with no solution...

[i]I have the problem on 2 different drupal sites, one with a "fresh" install of gallery and one with an upgraded gallery, both having the same problem.
Server A (upgraded gallery):
Drupal 5.1
MySql 5.0.27
PHP 5.2.1
Gallery2 API version: 7.54 / 1.5

Server B(fresh install):
Drupal 5.16
MySql 5.0.67
PHP 5.2.8
Gallery2 API version: 7.54 / 1.5

 
bwillette

Joined: 2006-11-01
Posts: 12
Posted: Fri, 2009-03-27 17:10

See the link to the other thread I posted above. I posted a solution that worked for me (and one other person). There's been no 'official' fix that I know of however.

 
bexbox

Joined: 2009-03-27
Posts: 4
Posted: Mon, 2009-03-30 16:46

Hi bwillette

<sigh> no dice...
I tried all 4 combos of .htaccess with the php flag turning off zlib.output_compression and changing the for() conditions in GalleryTemplateAdapter.class.

Adding the .htaccess actually makes the gallery pages look worse when accessed from Drupal and i get a 404 error when trying to access the gallery page directly. With just the .htaccess file in place, I get 3 Not Defined errors for PicLensLite, Yahoo, search_SearchBlock_init and no .css warnings. Without the .htaccess file, i get several .css warnings (probably un related)

With just the changes to the GalleryTemplateAdapter.class, gallery looks nice and when accessed from Drupal it looks nice as well. When i click on the view slideshow link from within Drupal, I don't get the YAHOO errors but I do get a "PicLensLite is not defined" error. I don't get the "piclenslite" error when accessing the gallery directly.

With no changes to either the .htaccess or the GalleryTEmplateAdapter.class, I get 3 Not Defined errors for PicLensLite, Yahoo, search_SearchBlock_init when accessed from inside the drupal site and no errors when i access gallery directly

When both changes are made, I get all 3 errors again and gallery pics aren't displayed and i can't access gallery directly, i get the "page not found" error. Pretty much the same errors as just the .htaccess changes.

I'm guessing the "PicLensLite" part is the problem. Thanks for the help and i'll keep trying!

~R

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Sat, 2009-06-06 19:12

Hi bexbox

I was wondering - did you ever solve this issue?
I didn't....

G

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-06-06 19:39