<!--[if lt IE 7]> Fatal error: Call to undefined function phptemplate_get_ie_styles() page-node-lightbox2.tpl.php on line 18

Merely copying original page-node-lightbox2.tpl.php gives error. I'd like to edit the tpl file but the original fails before editing.

I'm using Firefox 3, not IE.

Automatic Image Handling for Image node settings
Automatic handler for Image Nodes:
HTML Content grouped

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stella’s picture

What theme are you using?

drupaldoug’s picture

Zen Classic theme. But I tried other themes including stock. Accessing the lightbox gallery, they all crash with the error message:
<!--[if lt IE 7]> Fatal error: Call to undefined function phptemplate_get_ie_styles() page-node-lightbox2.tpl.php on line 18

stella’s picture

Status: Active » Fixed

The page-node-lightbox2.tpl.php is designed to work with the default theme, garland. That phptemplate_get_ie_styles() function is a garland function. You will need to modify this file to work with your own theme. It's only an example of what could be done.

Cheers,
Stella

drupaldoug’s picture

Status: Fixed » Active

Thanks for the clue. It's quite a surprise. I can't find the reference right now, but I believe the instruction was to copy page-node-lightbox2.tpl.php to your theme directory, not copy to your garland theme directory. If the file is not a generic example, it should be so described.

Thanks for the assistance.

stella’s picture

Status: Active » Fixed

The docs at http://drupal.org/node/252260 do say:

copy the lightbox2/page-node-lightbox2.tpl.php file to their theme's own directory and ensure it is readable. This file can be modified to suit your theme.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

mandclu’s picture

Just ran into this issue myself. This template file could be made more compatible by at least wrapping functions that are specific to individual themes within "if (function_exists('[theme-specific-function-here]')) {}" tags.

eaochoac’s picture

yes if (function_exists('[theme-specific-function-here]')) {} this is the best solution, I´ve added twice. Works perfect when adding lightbox2 to an html without any headers and you are using zen theme.

AaronBauman’s picture

Version: 6.x-1.8 » 6.x-1.x-dev
Status: Closed (fixed) » Needs review
FileSize
927 bytes

This issue persists to latest dev.

There is no reason one would want the lightbox page template to cause a fatal error out of the box, based on an undocumented and unenforced dependency on garland (a theme which is arguably past its prime). In the spirit of compromise, this patch adds "function_exists" calls to the template file (rather than removing them altogether).