[Solved] Content not displaying on Safari/Opera when caching

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

[Solved] Content not displaying on Safari/Opera when caching

Post by NikNak »

Hi

Just wondering if anyone could help point me in the right direction...

Using cmsms 1.11.1 on php5.3 I have a site in v early development that I am hoping to use external templates on (via {include....}

Currently, the site is working ok on Chrome, FF, Safari, Opera when the smarty caching option is switched off, but when I switch it on - the content blocks are no longer displayed in Safari and Opera, but are fine in FF and Chrome.

I figured the source code would be the same whatever the browser - but it seems this isn't the case here when I examine it.

The content is mostly the default content from the install, without module calls.

If I change the external templates back into normal ones contained in the db, it all works fine again.

My main question is why only Safari and Opera are receiving different code from cmsms.

Many thanks if you are able to shed some light here.

Regards
Nik

Apart from the standard extensions, I have:

MysqlDump 1.2.4
TinyMCE 2.9.4
AceEditor 0.2.4.2
CGExtensions 1.30
CGSimpleSmarty 1.5.2
ECB 1.3
ListIt2 1.2.2
CustomGS 1.3
AdvancedContent 0.9.4
CGSmartImage 1.9.4
Last edited by NikNak on Tue Sep 11, 2012 9:15 am, edited 1 time in total.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Content not displaying on Safari/Opera when caching on

Post by rotezecke »

This is a long shot, but the browser you are using for admin area access does not cache. So if you are logged in your cmsms in FF and are testing your frontend in FF you may not get the result as other mortals are getting when using FF.
so the question is, is your chrome and FF really working, or are you just logged in when testing these browsers?
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Content not displaying on Safari/Opera when caching on

Post by NikNak »

Dang - you're right!! Once logged out - none of the content is showing if caching is enabled!

Thanks so much - now I need to find out what's going wrong with the caching.

Kind regards

Nik
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: [Solved] Content not displaying on Safari/Opera when cac

Post by rotezecke »

maybe this post helps
http://forum.cmsmadesimple.org/viewtopi ... =8&t=62316

if you have any logic you need to wrap it with nocache.
from docs:

Code: Select all

   
{nocache}
  {content block='Sidebar' assign='sidebar'}
  {if $sidebar ne ''}<div id="sidebar">{$sidebar}</div>{/if}
{/nocache}
I learnt the above the hard way. but maybe you even have to call assigned content with nochace (without any logic) as {content} is not cached, but variables are.

Code: Select all

{content assign=foo}
{$foo nocache}
i haven't tried this though, just a thought.
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: [Solved] Content not displaying on Safari/Opera when cac

Post by NikNak »

Thanks - on another fresh install I tried this as a template:

{content assign="MainContent"}
<hr>
{$MainContent}
<hr>

If smarty caching is enabled, then no content is shown.

Adding the nocache to the variable resolves this.
{content assign="MainContent"}
<hr>
{$MainContent nocache}
<hr>

I've been trying to get external templates to work but to no avail: http://forum.cmsmadesimple.org/viewtopi ... =8&t=62830
This seems to resolved that aspect too.

What I need to understand then is whether there is any benefit to having "enable smarty caching" set to on, if we are disabling the caching on the content. ??

Thanks for your help
Nik
Locked

Return to “CMSMS Core”