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.

Releases and Announcements

Latest news about the SilverStripe software.

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

SilverStripe 2.4.1


Reply

6 Posts   1866 Views

Avatar
Ingo

23 July 2010 at 10:38am Forum Moderator, 801 Posts

See http://groups.google.com/group/silverstripe-announce/browse_thread/thread/22d7f0a7b6f2e8a9

Avatar
tbarho

28 July 2010 at 4:43am Community Member, 41 Posts

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

Avatar
tbarho

28 July 2010 at 4:45am Community Member, 41 Posts

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 =)

Avatar
Martijn

28 July 2010 at 5:00am Community Member, 271 Posts

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

Avatar
Ingo

28 July 2010 at 8:48am Forum Moderator, 801 Posts

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

Avatar
cyberde

17 August 2010 at 6:56am (Last edited: 18 August 2010 1:09am), Community Member, 10 Posts

I created a new thread from this post: http://www.silverstripe.org/upgrading-silverstripe/show/290536