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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Form Fields Retain data After Comment Post


Go to End


4 Posts   2867 Views

Avatar
Hello_electro

Community Member, 80 Posts

7 August 2011 at 5:48am

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

Forum Moderator, 5523 Posts

9 August 2011 at 8:43pm

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

Community Member, 80 Posts

10 August 2011 at 2:48am

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

Forum Moderator, 5523 Posts

10 August 2011 at 1:20pm

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 %>.