Jump to:

1043 Posts in 379 Topics by 373 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 2410 Views
  • zenmonkey
    Avatar
    Community Member
    483 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
    483 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?

  • Anonymous user
    Avatar
    Community Member
    1 Post

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

    And what do you see at line 63 of your Page.php file?

    It can sometimes be as simple as some forgotten text outside <?php ... ?> tags, that causes text output before cookies and other headers are set.

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

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