Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problems on client side: code changes does not reflect...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
pitbull1978
Smarty Rookie


Joined: 26 Feb 2004
Posts: 7
Location: Milan - Italy

PostPosted: Mon Mar 01, 2004 10:10 am    Post subject: Problems on client side: code changes does not reflect... Reply with quote

Hi! I've got some problems with Smarty...
When I change some code (JavaScript) or url images, I can't see changes on browser !!!
For example I have a file called functions.js where I put my JS functions...then I change a function or a name of a function, but browser doesn't seem to see it ! Why ? It seems that Smarty does not updates the compiled files or something else but very similar...and cache is not activated !!!
The same thing with images...I replace for example an image with the same name and I see the old one....
Can you help me ?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Mon Mar 01, 2004 11:09 am    Post subject: Reply with quote

This sounds like a caching issue.
See this post on how to avoid this: http://www.phpinsider.com/smarty-forum/viewtopic.php?p=6739#6739
Back to top
View user's profile Send private message
pitbull1978
Smarty Rookie


Joined: 26 Feb 2004
Posts: 7
Location: Milan - Italy

PostPosted: Mon Mar 01, 2004 11:39 am    Post subject: Reply with quote

Thanks for the tip. Now it seems to work...for images...I'll try for JS...thanx
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
pitbull1978
Smarty Rookie


Joined: 26 Feb 2004
Posts: 7
Location: Milan - Italy

PostPosted: Mon Mar 01, 2004 1:28 pm    Post subject: Reply with quote

I've found the problem Duncan !!!
The problem was in the configuration of APACHE 2.0 (on Fedora Core); I removed the lines about mod_cache (and mod_disk|mem...cache).
Now everything is ok !!! Page loading seems to be even better than before and every page is updated correctly.
I think I'll leave these settings until developmennt is finished.

In detail (for the future) I write the modified lines of httpd.conf:

#LoadModule cache_module modules/mod_cache.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule mem_cache_module modules/mod_mem_cache.so

Be sure to comment them in development stage !!!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Mon Mar 01, 2004 2:01 pm    Post subject: Reply with quote

pitbull1978 wrote:
I've found the problem Duncan !!!
The problem was in the configuration of APACHE 2.0 (on Fedora Core); I removed the lines about mod_cache (and mod_disk|mem...cache).
Now everything is ok !!!

Ah, excellent - I wouldn't have thought of mod_cache.
Thanks for the follow up, might help prevent another user with a similar issue Smile
Back to top
View user's profile Send private message
wolph
Smarty n00b


Joined: 16 May 2004
Posts: 3

PostPosted: Sun May 16, 2004 7:10 pm    Post subject: Reply with quote

Hi guys, I looked at this topic because I am having a similar problem--in this case though, it is that my css files are not being rendered properly. I do not have any of those options (the Apache modules enabled/loaded) so that could not be the problem. I went ahead and included the no caching meta tags but to no avail.

This is what is happening.

My template (.tpl) file is linking to two external .css files -- they define the display formating and colors for my header and footer temlplates.

What happens is that the page that gets generated has all the correct html output for the css files and the class attributes in the <div></div> tags that define my header and footer blocks. The problem is that, the browser then renders only a few of the css formats and ignors other rules like bg color.

Does smarty have such a known bug? I'll appreciate any help you may have. In the mean time, I'll continue with my search through the forum.

Thanks a mil.
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Sun May 16, 2004 7:26 pm    Post subject: Reply with quote

You could give literal a try http://smarty.php.net/manual/en/language.function.literal.php

in case the CSS rules get parsed by smarty.
Back to top
View user's profile Send private message
wolph
Smarty n00b


Joined: 16 May 2004
Posts: 3

PostPosted: Sun May 16, 2004 8:22 pm    Post subject: My Bad. Reply with quote

Embarassed

Well it turns out I was doing something wrong. I had just recently moved my themes folder into the webroot folder of my project because I was having problems pulling css files from it while it was outside my webroot folder. After the move (old habits die hard) I didn't update all the links that point to the new css locations; As such any changes did not get propagated to the web and I got frustrated.

Sorry for taking your time on this -- I'll be more careful next time. I think i should consider having a Smarty function that generates links basedon the link type say? I think i saw that in one of the exaples--would definitely help in classic situation as this.

Thanks a lot guys -- Duncan 'preciate the attempt.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP