I have a curious problem which I can't always reproduce but which is a minor nuisance when it does occur, and I was wondering whether anyone has any ideas what the cause might be. When I go to log in to the back end of my SilverStripe site, I get the message saying "Enter your email address and password to access the CMS", but no form fields are showing. If I simply click the browser's refresh button, the fields show up and I can log in. This would suggest some kind of cache problem to me but I don't know how to resolve it. Any suggestions would be welcome, thanks!
Just delete your browser cache.
That would deal with the symptoms, not the cause (and is effectively no better than a refresh). There is some problem within my Silverstripe setup which is causing this to happen repeatedly (with different browsers on different machines as well). That's what I want to sort out.
I a browser caches data, there is nothing SS can do about it.
There IS, of course, something SS can do about it - there's a whole range of cache control headers which a web server can issue to help manage browser cacheing. But I don't think it's anything to do with the browser cache as such - I'm pretty sure that first time, SS is serving the page without the form fields and then on a subsequent request is serving the required fields. I'll check this out next time it occurs.
What Version of SilverStripe are you using? I suggest you override the Login template with a custom one (mysite/templates/Security_login.ss) and check if that helps.
I was using 2.3.3, but I just upgraded to 2.3.4 and the problem is still there (although if anything slightly worse - the fields don't look right when they do display, but that might be a factor of my upgrade procedure). I'll try out your override suggestion, thanks.