Bug #42801
New FlowSession session class is broken
Status: | Resolved | Start date: | 2012-11-08 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Session | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 beta 1 | |||
PHP Version: | 5.4 | Complexity: | ||
Has patch: | No | Affected Flow version: | Git 1.2 (master) |
Description
Unfortunately the new FlowSession patch has been merged today some minutes before I could save my comment at review.typo3.org. If I switch my Flow project to the new FlowSession save handler I get the following exception if I try to use the ./flow command:
PHP Fatal error: Call to undefined method TYPO3\Flow\Cli\CommandRequestHandler::getHttpRequest() in /var/www/test/releases/20121108105617/Data/Temporary/Production/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Session_FlowSession_Original.php on line 162
Something seems to be wrong with the FlowSession intialization (should be disabled in Cli-mode?). If I flush the cache and request my project with the browser I just get a blank white page and nothing is logged (Doctrine proxy generation seems to fail too).
Associated revisions
[BUGFIX] Fix FlowSession initialization
This patch fixes the FlowSession initialization for non HTTP-Requests.
Previously the initializeObject() method was trying to retrieve the
HTTP request even from a CLI request handler, resulting in a fatal
error.
Additionally this patch now defines a default storage backend
(FileBackend) for FlowSession. Therefore it's now sufficient to enable
FlowSession in Objects.yaml for getting started.
The garbage collection now is more reliable and triggered when a session
is resumed instead of when the shutdownObject() method is called.
Resolves: #42801
Releases: 1.2
Change-Id: I9f9d03600fd69cfd2d03b585bbcc75009e80d1e3
History
#1 Updated by Karsten Dambekalns over 2 years ago
- Status changed from New to Needs Feedback
- Assigned To set to Robert Lemke
- Target version set to 2.0 beta 1
For me Neos works fine with the change in place.
#2 Updated by Martin Brüggemann over 2 years ago
@Karsten: Did you activate FlowSession handling in your Caches.yaml like described here? https://review.typo3.org/#/c/15942/6/Documentation/TheDefinitiveGuide/PartIII/SessionHandling.rst
Which Cache Backend are you using? Old PhpSession handler is running fine.
This is my config:
Caches.yaml
Flow_Session_Storage:
backend: TYPO3\Flow\Cache\Backend\RedisBackend
Objects.yaml
TYPO3\Flow\Session\SessionInterface:
className: TYPO3\Flow\Session\FlowSession
#3 Updated by Karsten Dambekalns over 2 years ago
Martin Brüggemann wrote:
@Karsten: Did you activate FlowSession handling
Nah, of course I obviously did not think hard enough. :)
#4 Updated by Robert Lemke over 2 years ago
- Status changed from Needs Feedback to Accepted
- PHP Version set to 5.4
#5 Updated by Gerrit Code Review over 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16365
#6 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16365
#7 Updated by Robert Lemke over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset beac8272f684c69cc08df4b5f5e90736279aa654.