Jump to:

649 Posts in 1606 Topics by 162 members

Releases and Announcements

SilverStripe Forums » Releases and Announcements » SilverStripe 2.4.1

Latest news about the SilverStripe software.

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

Page: 1
Go to End
Author Topic: 1790 Views
  • Ingo
    Avatar
    Forum Moderator
    801 Posts
  • tbarho
    Avatar
    Community Member
    41 Posts

    Re: SilverStripe 2.4.1 Link to this post

    Just installed 2.4.1, and am running into an error on a clean install. If I run a dev/build?flush=1, I get:

    [User Warning] Cookie 'PastMember' can't be set. The site started outputting was content at line 76 in /Users/tybarho/Sites/sitesprocket24/sapphire/dev/DebugView.php
    GET /dev/build

    Line 33 in /Users/tybarho/Sites/sitesprocket24/sapphire/core/Cookie.php
    Source

    24          $path = ($path) ? $path : Director::baseURL();
    25
    26          // Versions of PHP prior to 5.2 do not support the $httpOnly value
    27          if(version_compare(phpversion(), 5.2, '<')) {
    28             setcookie($name, $value, $expiry, $path, $domain, $secure);
    29          } else {
    30             setcookie($name, $value, $expiry, $path, $domain, $secure, $httpOnly);
    31          }
    32       } else {
    33          if(self::$report_errors) user_error("Cookie '$name' can't be set. The site started outputting was content at line $line in $file", E_USER_WARNING);
    34       }
    35    }
    36    
    37    /**
    38     * Get a cookie variable
    39     */

    Trace

    * Cookie 'PastMember' can't be set. The site started outputting was content at line 76 in /Users/tybarho/Sites/sitesprocket24/sapphire/dev/DebugView.php
    Line 33 of Cookie.php
    * Cookie::set(PastMember,1,90,,,,1)
    Line 84 of Controller.php
    * Controller->init()
    Line 26 of DatabaseAdmin.php
    * DatabaseAdmin->init()
    Line 136 of Controller.php
    * Controller->handleRequest(SS_HTTPRequest)
    Line 134 of DevelopmentAdmin.php
    * DevelopmentAdmin->build(SS_HTTPRequest)
    Line 137 of RequestHandler.php
    * RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    * Controller->handleRequest(SS_HTTPRequest)
    Line 281 of Director.php
    * Director::handleRequest(SS_HTTPRequest,Session)
    Line 124 of Director.php
    * Director::direct(/dev/build)
    Line 127 of main.php

  • tbarho
    Avatar
    Community Member
    41 Posts

    Re: SilverStripe 2.4.1 Link to this post

    If I clear cookies, the build works. Perhaps it's not checking the cookie correctly? Seems like it might be trying to set a cookie that's already set, without checking to see if it's set. Bleh, I'm a bad developer =)

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: SilverStripe 2.4.1 Link to this post

    I can confirm this happens sometimes (I think most of the time on a dev/build after a fresh install).

    Adding this to _config.php temporarily solves the problem:

    Cookie::set_report_errors(false);

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: SilverStripe 2.4.1 Link to this post

    This has been fixed in http://open.silverstripe.org/changeset/108397 and will be in the next micro release.

  • cyberde
    Avatar
    Community Member
    10 Posts

    Re: SilverStripe 2.4.1 Link to this post

    1790 Views
Page: 1
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.