[TYPO3-mvc] spl_object_hash not matching when using in Fluid ajax widget

Jonas Götze jonnsn at gmail.com
Tue Mar 8 14:57:27 CET 2011


Hi List,

I am currently trying to add and remove objects to an ObjectStorage 
using custom Fluid Widgets with ajax. So I generate the widget link and 
send the needed paramaters to the corresponding action with jquery 
ajax() - this works perfect, as usual with Extbase and Fluid ;)

In the Controller of the Widget I call
$myObject->removeMyStorageProperty($objectToRemove);
with no result (if I change other properties it works). So I took a 
closer look and found out that the hash generated by spl_object_hash() 
which is used as the key for the objectStorage internally did not match 
the one my $objectToRemove has.
How can that be?
Also I looped through the storage and compared the objects to my 
$objectToRemove like this:

foreach($myObjectStorage as $object){
	if($obj === $objectToRemove)
		// do something if they match
	else
		// do something if they did not match
}

This always resulted in the else-case.
Can someone give me a hint what is going wrong here?
Might it be a bug or am I simply using something the wrong way at all?
I'm using Extbase 1.3, Fluid 1.3 and TYPO3 4.5.2.

Thank you for your help!

Regards
Jonas


More information about the TYPO3-project-typo3v4mvc mailing list