|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
altendew Smarty Rookie
Joined: 07 Mar 2008 Posts: 19
|
Posted: Wed Jan 18, 2012 9:57 am Post subject: custom resource errors case sensitive |
|
|
I encountered a pretty big problem the other day, my websites get pretty heavy traffic, basically the same as here:
http://www.smarty.net/forums/viewtopic.php?p=77877
However all my stuff was already compiled but there was two files that kept being recompiled on every page load. I had a hard time figuring this out, but the reason is because of the names. The resources having problems looked like this.
_members_loginStatus
_securityForm
The problem was the one upper case character smarty didn't like.
After much digging I changed this line
Code: |
$_cache_key = 'template|' . $unique_resource_name;
|
to
Code: |
$_cache_key = 'template|' . strtolower($unique_resource_name);
|
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Jan 20, 2012 2:37 pm Post subject: |
|
|
Internally the resource names are case sensitive. Like on unix file systems foo.tpl is not equal to Foo.tpl.
You must have used in your application the names with inconsistant writing. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|