Having a different theme for the admin, the necessary head entries (script tags) are only written to the admin theme, while the regular user theme doesn't get updated. Took me some time to find out, hope this issue helps others...

My fix was to copy the missing script lines from the pages source code to the page.tpl.php

CommentFileSizeAuthor
#3 lightbox_screenshot_0.jpg36.86 KBnofue

Comments

stella’s picture

Assigned: Unassigned » stella

What themes are you using?

Cheers,
Stella

stella’s picture

Try the patch from #184962. I think it should fix your issue.

Cheers,
Stella

nofue’s picture

StatusFileSize
new36.86 KB

Thanks for taking the time to respond. Well, first the themes: I was using the 5.2 standard theme when installing Lightbox V2 as it is my admin theme. The default user theme is self written, however. Later I switched the admin theme to Minelli but the symptoms are the same, lightbox V2 displaying oddly in all the browsers I tested with a wide variety of effects:

Apple Safari 2 shows the image as expected, but text is missing entirely.

Firefox Mac shows the thumbnail in the screen overlay display, with text being shown about right (blue and black).

Apple Safari Beta 3 also shows the size of the thumbnail, but without actually showing any image, text is in the font color of the website (i.e. yellow on white in my case :)

Seems simply copying the missing script include lines into the page.tpl.php didn't help a lot.

Regarding the fix - thanks for pointing me there, but I have simply no idea how to apply that... Have to wait for a new release though...

Thanks again for working on this module.

stella’s picture

You can try the latest dev release. It includes this patch and is stable.

Cheers,
Stella

nofue’s picture

Servus, Stella.

Thanks for the dev version -- installed it immediately and this is what happens:

Firefox 2.0.0.8 -> shows thumb instead of full size image in overlay. However, the text seems right, also shows a link "Enlarge Image" which takes the user to a plain empty browser page with the jpg in the upper left corner. Strange :)

Safari Beta 3 -> shows the image in full size when clicked, everything works, but text is displayed in the documents text color (here: yellow on white), the caption (which gets shown in FF) is missing, and the translation isn't honored (it is in Firefox), so it says "Image 3 of 17" instead of the German translation.

Safari Beta 2 also does it mostly the way Safari Beta 3 does it, but also shows that zoom in button constantly (even on a 1280x1024 screen with an image of 320x240).

This only in the "user theme", when I keep the lines I copied over (script imports related to lightbox). In the admin theme (minelli) it still doesn't work if I remove the lines I copied into page.tpl.php. This whole thing confuses me a bit and I have some headache today, so I postpone testing a bit...

Bottom line: it's still lacking some functionality, but at least the users can see the images in a slide show and that's sufficient for the moment. Once that headache is gone I'll do more testing.

Thanks again for your ongoing support,

Norbert

stella’s picture

For Safari issues, see #186341. Maybe you should add the results of your safari browser testing there, if not already reported in that issue. Support isn't normally provided for beta browsers, but if I have time I might take a look at some of them.

Re. Firefox issue, I don't have any problems with it on my test site, but I must admit I'm slightly confused now.

Is it the admin theme or the user theme that has problems in Firefox? Your original issue said that the script head entries weren't written to the user theme, but your last one seems to suggest a problem in the admin theme as well. Can you tell me what happens when you don't include the script lines in your theme's page.tpl.php? If they're being loaded twice (once by lightbox2 module and once by the theme), it could cause problems, so if you could test without those lines you added that would be best. Are any errors reported in the Firefox Error Console (under Tools menu).

Your user theme is a custom theme and your admin theme is minelli, right? Is this a live site that I can check out? Perhaps you could send me some page source code if not?

Cheers,
Stella

stella’s picture

Status: Active » Postponed (maintainer needs more info)
nofue’s picture

Servus, Stella.

Sorry for responding late, pretty busy here...

For Safari issues, see #186341. Maybe you should add the results of your safari browser testing there, if not already reported in that issue. Support isn't normally provided for beta browsers, but if I have time I might take a look at some of them.

Safari isn't beta any more, but the problem persists.

Re. Firefox issue, I don't have any problems with it on my test site, but I must admit I'm slightly confused now.

Sorry...

Is it the admin theme or the user theme that has problems in Firefox? Your original issue said that the script head entries weren't written to the user theme, but your last one seems to suggest a problem in the admin theme as well.

To me it seems as if the lightbox module only tells the theme in effect to add the necessary JS inlcudes. When themes are changed later (bringing in a different page.tpl.php) thing start acting strange.

an you tell me what happens when you don't include the script lines in your theme's page.tpl.php?

If I omit the includes, the thumbnail is shown in place of the full size image on top of the semitransparent layer. I have only two image sizes in imagecache, 'thumbnail' and 'fullsize' (700x700). Somehow 'fullsize' doesn't get called when I omit the includes. The white rectangle below the picture is of correct size, however, with the thumbnail sized picture being displayed at the upper left corner of the white rectangle.

Your user theme is a custom theme and your admin theme is minelli, right? Is this a live site that I can check out?

Feel free to take a peek at
http://www.name-live.com

To get to the source of the problems, proceed to "Fotos" and select a gig from the list, such as
http://name-live.com/gig/2005/12/x_mas_special

Please not the lines

<script type="text/javascript" src="/sites/all/modules/jquery_update/compat-1.0.js"></script>
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/image_nodes.js"></script>
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightbox.js"></script>
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightningload.js"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_update/collapse-fix.js"></script>
<script type="text/javascript">Drupal.extend({ settings: { "lightbox2": { "disable_zoom": 0, "group_images": 1, "disable_for_gallery_lists": 1, "node_link_text": "Bild vergr&ouml;&szlig;ern", "image_count": "<strong>Bild !current</strong> von !total &nbsp;|&nbsp;<strong>Bl&auml;ttern</strong> durch Klicken auf den linken oder rechten Bildrand. <strong>Beenden</strong> durch Klick au&szlig;erhalb des Rahmens.", "lite_press_x_close": "press \x3ca href=\"#\" onclick=\"hideLightbox(); return false;\"\x3e\x3ckbd\x3ex\x3c/kbd\x3e\x3c/a\x3e to close" } } });</script>

on top of the source code -- those were the lines I had to copy (from the admin theme) to the page.tpl.php file of my theme in order to make the pictures appear in fullsize when clicked.

Hope it helps to track down the problem. Have you tried to install and setup lightbox v2 on a site where the admin theme's different from the regular theme yet? Seems this is where the trouble comes from...

stella’s picture

Hi,

I have tested this on a site with a different user theme from my admin theme but couldn't reproduce the problem. The javascript files should be loaded anew on each page. However, I have made some changes to the javascript files in the last couple of weeks (including how they're loaded). For example, the lightningload.js file no longer exists.

Perhaps you could try out the latest dev version? Don't worry, it is stable and includes a number of fixes for browsing in IE that you probably should have. I was hoping to do a release of it this week, so if we can find a solution for your issue soon then I'll try and include it in the release.

Regarding safari issues, please report any new issues, solutions, etc at #186341. Safari for the Mac may not be beta, but Safari for Windows definitely is. Unfortunately, I don't have a Mac on which to test the Safari Mac version, but until I do, I want to keep track of all Safari issues in a central location.

In the meantime, I'm going to set my site up with multiple themes again. Please try out the dev release and let me know how you get on.

Cheers,
Stella

nofue’s picture

Servus, Stella.

Installed the most recent .dev version, but... If I remove the lines I added to page.tpl.php, the image (full size) gets shown on a separate page (as said on the Safari Issue page). However, deleted all of the lines I added but

<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightbox.js"></script>

<script type="text/javascript">Drupal.extend({ settings: { "lightbox2": { "disable_zoom": 0, "group_images": 1, "disable_for_gallery_lists": 1, "node_link_text": "Bild vergr&ouml;&szlig;ern", "image_count": "<strong>Bild !current</strong> von !total &nbsp;|&nbsp;<strong>Bl&auml;ttern</strong> durch Klicken auf den linken oder rechten Bildrand. <strong>Beenden</strong> durch Klick au&szlig;erhalb des Rahmens.", "lite_press_x_close": "press \x3ca href=\"#\" onclick=\"hideLightbox(); return false;\"\x3e\x3ckbd\x3ex\x3c/kbd\x3e\x3c/a\x3e to close" } } });</script>

and it still works. I looked up another site of mine (4.8, identical user and admin theme) where Lightbox works like a charm since day 1. There is that '.../lightbox.js' line I kept with the offending 5.3 site... But I think that line should get in to the page automatically, right?

However, with those changes things work fine. Well, too late here to go any deeper -- let me know if I can do any more to assist your efforts.

Thanks,
Norbert

stella’s picture

I've setup my test site with 'garland' as the admin theme and 'minelli' as the user theme and I can't reproduce this issue. On each page the javascript is loaded and lightbox works. I've tried it in Firefox 2.0.0.11 and IE7, both on Windows. Other than Safari, what other browsers and platforms have you tried? Have you only tried it in Firefox Mac, or also Firefox Windows/Linux?

I'm still confused to whether the lightbox stops working in the user or admin theme, though both work fine for me. Any chance it could be an issue with your custom user theme? Can you confirm that you installed jQuery Update correctly, i.e. copied its jquery.js file over the one in the misc/ directory? I'm unsure that it's not because I don't see the other 2 jquery_update module js files: 'jquery_update/compat-1.0.js' and 'jquery_update/collapse-fix.js' in your header. To me that looks like you haven't installed the jQuery Update module correctly or you don't have a line like <?php print $scripts ?> in your theme's page.tpl.php.

I'm at a loss here. I can't reproduce this issue at all and think it may be something related to your specific installation / configuration.

Cheers,
Stella

nofue’s picture

Servus, Stella.

Other than Safari, what other browsers and platforms have you tried? Have you only tried it in Firefox Mac, or also Firefox Windows/Linux?

The working version (i.e. with the lines I included by hand) has been tested on various platforms and browsers, however, the non-working version has only been checked with Safari/FF Mac, FF/IE7 Windows. I think I made some more tests using IE 5 Win98, but can't tell if I made major changes later...

I'm still confused to whether the lightbox stops working in the user or admin theme, though both work fine for me.

I checked again -- and Lightbox neither works correctly in the Admin theme (the fixed width version, forgot if that's Minelli or Garland): it displays only the thumbnail sized images instead of the preview images when clicked.

Any chance it could be an issue with your custom user theme? Can you confirm that you installed jQuery Update correctly, i.e. copied its jquery.js file over the one in the misc/ directory? I'm unsure that it's not because I don't see the other 2 jquery_update module js files: 'jquery_update/compat-1.0.js' and 'jquery_update/collapse-fix.js' in your header.

Sadly, no. My theme seems to do even better than the Minelli/Garland theme I'm using for the administration. Of course I've installed jquery Update correctly, and those two files you mentioned got deleted yesterday when trying again -- the thing works even without those two files...

To me that looks like you haven't installed the jQuery Update module correctly or you don't have a line like print $scripts in your theme's page.tpl.php.

You're somewhat right with that -- there's no call to $scripts.
Maybe it never has been there as I upgraded that site from 4.7 and I think there was no $scripts directive needed / available. However, I inserted the missing lines by hand... Just to make sure, I switched back to the php line and guess what? Only the thumbnails are shown instead of the preview when clicked, as with the canned theme...

Funky: whenever only the thumbnail is shown, there's a line "Enlarge Picture" and clicking there it displays the picture on a blank page (as if one loads the JPG directly into the browser).

Well, as this is a working site I can't do much about it. All I can state is that Lightbox V2 behaves nicely with 4.7.8. However, I'm going to set up another site tonight using 5.3, and I promise to pay special attention to the Lightbox installation...

I'm at a loss here. I can't reproduce this issue at all and think it may be something related to your specific installation / configuration.

I see the problem, having worked in end user support for quite some years in the past. And my 4.7.8 sites don't show that problem, even with way heavier tweaked themes (but there's the same theme for all pages, however). Let's see how things work with the site I build from scratch -- maybe the site in question suffers from a previous installation of Thickbox (or jquerybox or whatever it has been named)...

So far the site works OK with the manually added lines, and I simply don't have the time to deal with deep detail here. If the next site also shows odd effects, I hope I can point you closer to the problem. Thanks for your patience,

Norbert

nofue’s picture

Servus, Stella.

Spending the past days (and nights, partly at least) with a similar site I installed from scratch (5.3, upgraded to 5.5 already) everything's fine, even using various (canned and self made) themes.

I think the site which caused the trouble got a dent at some upgrade -- it came a long way since I think 4.7.3 and is now 5.3.

Testing was done with Safari 3.0.4 and the Firefox 2.0.0.11 on Macintosh (PPC and Intel) so far. Once the site is considered finished I'll do the usual CSS tweaking using various Windows versions and browsers...

Hope this is good news for you,
thanks for your patience & support,

Norbert

stella’s picture

Status: Postponed (maintainer needs more info) » Fixed

That is good news. I'll marked as fixed, please re-open if it happens again on a different site.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.