Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Blog Module

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Form Fields Retain data After Comment Post


Reply

4 Posts   1430 Views

Avatar
Hello_electro

7 August 2011 at 5:48am Community Member, 80 Posts

Hi:

I am noticing that after I post a comment to a blog entry, the information does not clear out of the form fields. Even if I close the browser and return to the page, my previous information is still sitting in the fields, even with the comment submitted.

Any ideas why this is happening and/or solutions?

Thanks!

Avatar
Willr

9 August 2011 at 8:43pm Forum Moderator, 5511 Posts

SS stores the comment name, email and url in a cookie. though it shouldn't store the comment text. If it stores comment text you may want to check if you have partial caching or static caching enabled. In those cases you'll need to disable caching for the comments area.

Avatar
Hello_electro

10 August 2011 at 2:48am Community Member, 80 Posts

Thanks Will.

I do have a cache folder in the root to help speed up the site, think that may be the culprit? I did not notice it storing comment data though. so I guess its ok then and makes it easier for a returning user.

Do you think i should consider disabling the storage of that info though? If so, can you direct me to where I can find info on how?

Avatar
Willr

10 August 2011 at 1:20pm Forum Moderator, 5511 Posts

All SilverStripe sites will have a cache folder. The cache will contain at least a manifest of all the classes used but in the event of using static caching (i.e if there are .html files in that cache folder) then you will need to disable the static cache for those pages. Or if you see <% cached %> in your template file then you can wrap the $PageComments variable with an <% uncached %>$PageComments<% end_uncached %>.