Jump to:

1153 Posts in 2568 Topics by 408 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set.

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1 2
Go to End
Author Topic: 2838 Views
  • zenmonkey
    Avatar
    Community Member
    527 Posts

    2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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

  • ram
    Avatar
    Community Member
    19 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    Hi zenmonkey,

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

    Regards,
    Ram
    http://www.agriya.com,http://www.rayzz.net, http://www.anova.tv, http://www.isocial.in, http://www.markit.me

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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

  • ram
    Avatar
    Community Member
    19 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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.

    Regards,
    Ram

  • Fairfax71
    Avatar
    Community Member
    13 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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/beta.alt-katholisch-hannover.de/mysite/code/Page.php

    Trace

    Cookie 'bypassStaticCache' can't be set. The site started outputting was content at line 63 in /srv/web/tal-15299/beta.alt-katholisch-hannover.de/mysite/code/Page.php
    Line 33 of Cookie.php
    Cookie::set(bypassStaticCache,,0)
    Line 622 of Versioned.php
    Versioned::choose_site_stage()
    Line 940 of Versioned.php
    Versioned->modelascontrollerInit(ModelAsController,,,,,,)
    Line 963 of Object.php
    Object->extend(modelascontrollerInit,ModelAsController)
    Line 31 of ModelAsController.php
    ModelAsController->init()
    Line 47 of ModelAsController.php
    ModelAsController->handleRequest(SS_HTTPRequest)
    Line 111 of RootURLController.php
    RootURLController->handleRequest(SS_HTTPRequest)
    Line 283 of Director.php
    Director::handleRequest(SS_HTTPRequest,Session)
    Line 127 of Director.php
    Director::direct(/)
    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?

  • Fairfax71
    Avatar
    Community Member
    13 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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. ;-)

  • nakashu
    Avatar
    Community Member
    24 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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.

  • nakashu
    Avatar
    Community Member
    24 Posts

    Re: 2.4 [User Warning] Cookie 'bypassStaticCache' can't be set. Link to this post

    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 -> http://en.wikipedia.org/wiki/UTF-8#Byte_order_mark

    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.

    2838 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.