Constants differ - why?

Found a bug? Tell us!!
Post Reply
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Constants differ - why?

Post by Timbalu »

I just found something really weird....

A Plugins smarty template uses some default lang constants, i.e. {$CONST.RECOMMENDED}

I have two scenarios:
Serendipity 1.5.4, using Smarty3 - {$CONST.RECOMMENDED} is working
Serendipity 1.6, using Smarty2 - {$CONST.RECOMMENDED} is not there, but {$smarty.const.RECOMMENDED} is working as expected.

What might have changed between S9y 1.5.4 and 1.6 which could cause such an issue?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Constants differ - why?

Post by garvinhicking »

Hi!

Might depend on the template's execution order and how exactly the template is rendered, and if the constants are properly loaded before the template is rendered.

Hard to say without the exact code. I don't think anything in s9y 1.54 or 1.6 are the cause of this, rather Smarty3 would be.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Constants differ - why?

Post by Timbalu »

I'm sorry, I just found my local pre filter function serendipity_replaceSmartyVars() been commented out in the replace part. I think, I did this testwise when we recently had this little discussion about using $smarty.const.CONSTANTS in templates... and forgot to uncomment again...

==SOLVED==
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply