[Flow] blog example (definitive Guide) not working

Peter Linzenkirchner liste at lisardo.de
Sun May 26 22:21:38 CEST 2013


Hello 

I found this in the blog of robert lemke: 

Implementing safe and frustration-free requests
TYPO3 Flow 2.0 will support the notion of safe request methods in these ways:

	• CSRF tokens won't be checked for "safe" requests
	• CSRF tokens still are required for "non-safe" request methods to methods protected by a policy
	• the persistence layer will not persist any changes (with persistAll()) for GET requests
	• the link view helpers and UriBuilder won't add any CSRF tokens anymore
	• the form view helper will add a token to their set of hidden fields

http://robertlemke.com/en/blog/no-more-csrf-hassles-safe-requests-in-typo3-flow-2-0.html

calling setup in the blog example is indeed a GET-Request and i get this LOG entry when calling the setupAction: 

No CSRF required, safe request

Given this: 

"the persistence layer will not persist any changes (with persistAll()) for GET requests"

the setup cannot work anymore because persistAll() is never activated. 

---

I am really a beginner in flow (for two days now) so perhaps I am completely wrong ... 

Peter


Am 26.05.2013 um 21:55 schrieb Peter Linzenkirchner <liste at lisardo.de>:

> I filled the database manually with dummy data and found, that the new and create actions works without problems. So i can fill the database with forms but not within the controller (setup). Is it possible that the problem is a result of the new CSRF protection of version 2 which needs a security token in order to activate the persistAll-Comand? 
> 
> Additional the errors among the authentication of the blog example results from the new security role management i presume. 
> 
> Anyway: the blog example does not work with version 2. 
> 
> Peter
> 
> 
> 
> 
> Am 26.05.2013 um 20:21 schrieb Peter Linzenkirchner <liste at lisardo.de>:
> 
>> Hello!
>> 
>> i am exploring flow this weekend but found a problem which i cannot solve for about a few hours now. 
>> 
>> First i installed flow (last version, 2.0) following the quickstart example which works quite well. i finished the quickstart, can add my coffee beans so the database connection is working. 
>> 
>> After that i tried Part II of Getting Started. All works well until the setup Controller: 
>> http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Controller.html
>> 
>> When i call http://flowtest.local/typo3.blog/setup i get "Successfully created a blog" as expected but the database remains empty. No error is thrown and debugging with 
>> \TYPO3\FLOW\var_dump($this->blogRepository)
>> shows me the correct output: 
>> 
>> Flow Variable Dump
>> TYPO3\Blog\Domain\Repository\BlogRepositorysingletonobjectproxy
>> persistenceManager => TYPO3\Flow\Persistence\Doctrine\PersistenceManagersingletonobjectproxy
>> entityClassName => 'TYPO3\Blog\Domain\Model\Blog
>> ' (28)
>> defaultOrderings => array(empty)
>> 
>> So i presume that my code is correct, only the data is not written into the database. 
>> 
>> Because i am not able to found the problem for hours i deleted my blog example and installed the finished blog example. Updating the database works without problem but calling setup ends in an error with the authentication class. After commenting these lines the setup runs without any further errors but with the same result as my own example: no error but an empty database. 
>> 
>> So my question: is there anything different in the persistant layer of version 2.0? Do i need to alter the blog example in order to persist the data? My coffeebean-Example still works ... 
>> 
>> Thanks!
>> Peter
>> 
>> 
>> 
>> --
>> Xing: http://www.xing.com/profile/Peter_Linzenkirchner
>> Web: http://www.typo3-lisardo.de
>> Facebook: http://tinyurl.com/lisardo-multimedia
>> 
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
> 
> -- 
> -----------------------------------------------
> Peter Linzenkirchner
> Lisardo EDV-Beratung
> Katharinengasse 20, Rückgebäude, Eingang Bleigäßchen 5
> 86150 Augsburg
> Tel. +49-821-150565, Fax +49-821-150595
> http://typo3-lisardo.de
> info at lisardo.de
> -----------------------------------------------
> 
> --
> Xing: http://www.xing.com/profile/Peter_Linzenkirchner
> Web: http://www.typo3-lisardo.de
> Facebook: http://tinyurl.com/lisardo-multimedia
> 
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow

--
Xing: http://www.xing.com/profile/Peter_Linzenkirchner
Web: http://www.typo3-lisardo.de
Facebook: http://tinyurl.com/lisardo-multimedia



More information about the Flow mailing list