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.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

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

2.4 [User Warning] Cookie 'bypassStaticCache' can't be set.

Go to End

10 Posts   2903 Views


6 May 2010 at 1:50am Community Member, 528 Posts

I'm getting the following error on debug after upgrading to 2.4

[User Warning] Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 72 in /Applications/MAMP/htdocs/Ophoria_2.4/sapphire/dev/Debug.php
GET /Ophoria_2.4/vibes/bliss/?debug=1

Line 33 in /Applications/MAMP/htdocs/Ophoria_2.4/sapphire/core/Cookie.php


6 May 2010 at 10:22pm Community Member, 19 Posts

Hi zenmonkey,

if you use old gallery module please remove and check it. let me know if you need any more clarifications.



7 May 2010 at 12:55am Community Member, 528 Posts

I'm not using the Gallery Module. I upgraded to the Latest Version of DOM just in case, but that didn't fix it. I'm still getting the error


7 May 2010 at 1:06am Community Member, 19 Posts

hi zenmonkey,

same issue found when i upgrading 2.4.0. i removed gallery module and working fine for me.

another test: can you remove all old module from site and check it and let me know.



11 May 2010 at 8:27am (Last edited: 11 May 2010 8:29am), Community Member, 13 Posts

Hi all,

I have the same problem -- after upgrading to 2.4.0, I get this error:

[User Warning] Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 63 in /srv/web/tal-15299/


Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 63 in /srv/web/tal-15299/
Line 33 of Cookie.php
Line 622 of Versioned.php
Line 940 of Versioned.php
Line 963 of Object.php
Line 31 of ModelAsController.php
Line 47 of ModelAsController.php
Line 111 of RootURLController.php
Line 283 of Director.php
Line 127 of Director.php
Line 127 of main.php

The only extra module installed is the blog module; I tried removing it and running /dev/build?flush=1 again, and reinstalling the blog module, but to no avail.

Any ideas?


11 May 2010 at 9:34pm Community Member, 13 Posts

That's what had me confused -- I looked and didn't see anything in my text editor (BBEdit on the Mac).

Then after reading your post, I tried opening it in a CLI editor, and saw that the last line with filled with junk characters that BBEdit simply didn't show in the default setting (if I turned on "Show invisibles", then BBEdit showed them). I removed that, and now it seems to work fine -- but I'm baffled as to where the junk at the end of the file came from.

Anyway, thanks for reminding me to look harder. ;-)


27 May 2010 at 11:28pm Community Member, 24 Posts

Hey all.

Got same error message, but it happens everytime I install DOM.
SS2.4 - latest DOM downloaded from trunk, and right after I create some page types to use DOM, the error pops up.

Tripple checked for hidden characters, in many editors, nothing to be found there.

trace is pointing to a Object.php in mysite/code ... that file is extending dataobject..

I would be very grateful for any help ..
have a nice day.


31 May 2010 at 10:41pm Community Member, 24 Posts

Ok sorted it out:
it was an encoding problem, when ever i changed encoding from ansi to utf-8 the errors occured, as i needed to have special character included utf-8 was necesary.
solution - notepad++ god in encoding options: one called convert to utf-8 without BOM, that one fixed all the issues.
What BOM is ->

All things to try at one place to fix this issue.:
1. Remove and install new DOM modules, gallery module, etc. - for ss2.4
2. Look at the begging and end of your files for some rubish characters, and remove them / set show all characters
3. Try converting/changing encoding to ANSI, respectively to "UTF-8 without BOM" if needed.

have a nice day.

Go to Top