Unrecognized tag 'global'

Procyon

Joined: 2008-11-30
Posts: 42
Posted: Fri, 2012-02-24 22:58

Hello,

My gallery albums show this at the bottom of the page:

Fatal error: Smarty error: [in includes/footer.php line 4]: syntax error: unrecognized tag 'global' (Smarty_Compiler.class.php, line 583) in /home/usrename/public_html/lib/smarty/Smarty.class.php on line 1095

Can anybody point me in the right direction as how to fix this error?


Gallery version 2
Here is the PHP info from my host: http://www.hostlead.com/phpinfo.php

Thanks.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-02-25 00:17

Using an include in gallery templates means that smarty will try to compile the included code. This is not the best method.

Better method is to use gallery's embed API tools and samples.

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

 
Procyon

Joined: 2008-11-30
Posts: 42
Posted: Sat, 2012-02-25 01:48

Hmm...I don't know much about customizing gallery 2. That error wasn't there before. Is there an easier way around this?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-02-25 03:34

I don't have nearly enough information to render any further opinion.
All I know is you are using gallery2, you're including a "footer.php" and smarty does not like it.

I don't know if you're using an integration package or if this is homegrown.....

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

 
Procyon

Joined: 2008-11-30
Posts: 42
Posted: Sun, 2012-02-26 02:02

http://www.ww2incolor.com is the site. Google analytics is not showing anymore in page source.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-02-26 03:28

Assuming that your template and footer.php have not been altered, try clearing your template cache.

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

 
Procyon

Joined: 2008-11-30
Posts: 42
Posted: Sun, 2012-02-26 03:43

when I try to run it, it says:

Warning: rmdir(/home/username/public_html/g2data/smarty/templates_c/) [function.rmdir]: Directory not empty in /home/username/public_html/modules/core/classes/GalleryPlatform.class on line 505

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/modules/core/classes/GalleryPlatform.class:505) in /home/username/public_html/modules/core/classes/GalleryPhpVm.class on line 142

Then when I go back to the maintenance page it says:

Last Run Details:

Unable to delete directory: /home/ww2admin/public_html/g2data/smarty/templates_c/

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-02-26 04:31

you can manually delete that directory, gallery will re-create it.

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

 
Procyon

Joined: 2008-11-30
Posts: 42
Posted: Sun, 2012-02-26 06:59

Just did. It ran fine, but the error is still there.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-02-26 13:44

so what is the content of includes/footer.php line 4

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

 
Procyon

Joined: 2008-11-30
Posts: 42
Posted: Sun, 2012-02-26 22:44

Thanks I fixed it. It had an extra </div> in the code. The weird thing is that I didn't touch any of my files. Oh well! Thanks for the help suprsidr! Greatly appreciated.