[Flow] TYPO3.TYPO3CR updating nodes

Sebastian Müller sebastian.mueller at elementare-teilchen.de
Mon May 13 15:55:09 CEST 2013


Hey everybody,

we are using the TYPO3.TYPO3CR package for its node repository where we  
want to store e.g. locations hierarchical.
Creating works just fine. Opening edit view works also (showing form and  
name of node to edit), but if we send the form we get the error
"An error occurred while trying to call  
ElementareTeilchen\Test\Controller\LocationController->updateAction()".
Our method declarations look like that:
	/**
	 * Updates the given location node
	 *
	 * @param \TYPO3\TYPO3CR\Domain\Model\PersistentNodeInterface $node The  
location node to update
	 * @return void
	 */
	public function updateAction(PersistentNodeInterface $node) {

In our editAction flow is able to create/get the node object but when  
sending to updateAction it is not.
Is it due to the fact that we go to the editAction using
<f:link.action action="edit" arguments="{node: node}">Edit</f:link.action>
which ends in a link like  
"http://dev.test.elementare-teilchen.de/elementareteilchen.test/location/edit?node=%2Flocations%2Fusa-518965c51f720"  
(its uses the node path), while our update form uses the [__identity]? Can  
nodes only be accessed using the path? How should a the form be build  
using fluid?

Our form using fluid and property results in the following HTML:

<form name="node" action="location/update" method="post">
<div style="display: none">
<input type="hidden" name="node[__identity]"  
value="70be559d-feaa-8c66-5c70-1145fea5b5f4">

<input type="hidden" name="__referrer[@package]"  
value="ElementareTeilchen.Test">
<input type="hidden" name="__referrer[@subpackage]" value="">
<input type="hidden" name="__referrer[@controller]" value="Location">
<input type="hidden" name="__referrer[@action]" value="edit">
<input type="hidden" name="__referrer[arguments]"  
value="YToxOntzOjQ6Im5vZGUiO3M6Mjg6Ii9sb2NhdGlvbnMvdXNhLTUxODk2NWM1MWY3MjAiO30=a99050ae65b11b48d56cbe816fc9ba5e00bbe9fe">
<input type="hidden" name="__trustedProperties"  
value="a:2:{s:4:&quot;node&quot;;a:2:{s:10:&quot;properties&quot;;a:1:{s:4:&quot;name&quot;;i:1;}s:10:&quot;__identity&quot;;i:1;}i:0;i:1;}d10179380b64ce99bc17fc1768723ec4b2c4477c">
<input type="hidden" name="__csrfToken"  
value="16ed7e0655e0fcdb2d9e9b7d0f7f2cc5">
</div>

		<label for="name">Name</label>
		<input id="name" type="text" name="node[properties][name]" value="asdf">

		<input type="submit" name="" value="Update">
	</form>

Hopefully this is not written to confusing and not to long :-)

Greets,
Sebastian


More information about the Flow mailing list